ricaun.Revit.DA 1.0.0

Prefix Reserved
dotnet add package ricaun.Revit.DA --version 1.0.0                
NuGet\Install-Package ricaun.Revit.DA -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ricaun.Revit.DA" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ricaun.Revit.DA --version 1.0.0                
#r "nuget: ricaun.Revit.DA, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ricaun.Revit.DA as a Cake Addin
#addin nuget:?package=ricaun.Revit.DA&version=1.0.0

// Install ricaun.Revit.DA as a Cake Tool
#tool nuget:?package=ricaun.Revit.DA&version=1.0.0                

ricaun.Revit.DA

Revit 2019 Visual Studio 2022 Nuke License MIT Build Release

ricaun.Revit.DA

ricaun.Revit.DA package makes it easier to work with Design Automation, and fix some issues and limitations from the official Design Automation for Revit.

This project was generated by the ricaun.AppLoader Revit plugin.

PackageReference

Install the ricaun.Revit.DA library from NuGet.

<PackageReference Include="ricaun.Revit.DA" Version="*" />

Features

The main feature of this library is to fix some issues and limitations from the official Design Automation for Revit.

DesignApplication

The DesignApplication is a base class with the IExternalDBApplication interface and some abstractions to help you to execute Design Automation for Revit.

public class App : DesignApplication
{
    public override bool Execute(Application application, string filePath, Document document)
    {
        return true;
    }
}

The DesignApplication<T> support the T type using the interface IDesignAutomation and an instance is created to Execute the Design Automation.

public class App : DesignApplication<DesignAutomation>
{

}
public class DesignAutomation : IDesignAutomation
{
    public bool Execute(Application application, string filePath, Document document)
    {
        return true;
    }
}

The OnStartup and OnShutdown methods are virtual to be overridden.

public class App : DesignApplication<DesignAutomation>
{
    public override void OnStartup() {}

    public override void OnShutdown() {}
}

Properties

ControlledApplication

The ControlledApplication stores the internal ControlledApplication from the IExternalDBApplication.

public override void OnStartup()
{
    ControlledApplication.ApplicationInitialized += (s, e) => { };
}
UseConsoleLog

The UseConsoleLog is true by default to disable/enable the console log for the internal DesignApplication methods.

public class App : DesignApplication<DesignAutomation>
{
    public override bool UseConsoleLog => false; // true by default
}
UseDesignApplicationLoader

The UseDesignApplicationLoader is true by default to force the Design Automation to support PackageContents.xml with multiple versions.

public class App : DesignApplication<DesignAutomation>
{
    public override bool UseDesignApplicationLoader => false; // true by default
}
UseExternalService

The UseExternalService is true by default to force the Design Automation to support ActiveAddInId by executing the Execute inside the ExternalService.

public class App : DesignApplication<DesignAutomation>
{
    public override bool UseExternalService => false; // true by default
}

Tests

The ricaun.Revit.DA.Tests test project requires some environment variables with the APS configuration to enable running Design Automation for Revit and test the ricaun.Revit.DA.Example.

The project use the package Autodesk.Forge.Oss.DesignAutomation with the environment variables APS_CLIENT_ID and APS_CLIENT_SECRET.

APS_CLIENT_ID=<your client id>
APS_CLIENT_SECRET=<your client secret>

Your APS application requires to have API access to Data Management API and Design Automation API.

Build

To build the project and generate the ricaun.Revit.DA.Example.bundle.zip is required to run the Build project or execute the build.cmd in the main solution folder.

License

This project is licensed under the MIT License.


Do you like this project? Please star this project on GitHub!

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed. 
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 68 1/22/2025