DesignAutomationHandler is a Revit addin that allows users to run/debug their Design Automation for Revit application locally with desktop Revit.
- Forge Account: Learn how to create a Forge Account, activate subscription and create an app at this tutorial.
- Visual Studio: 2017 or newer
- .NET Core basic knowledge with C#
- Revit 2019: required to compile changes into the plugin
- Build the solution
DesignAutomationHandler
, compiling DesignAutomationHandler for Revit 2018.3 (DesignAutomationHandler2018
) and Revit 2019.2 (DesignAutomationHandler2019
)
Design Automation for Revit currently only supports Revit 2018 and 2019.
-
The
DesignAutomationHandler.addin
should be copied to the "Addins" folder (C:\ProgramData\Autodesk\Revit\Addins\XXXX\
), see Post-Build event. NoteXXXX
is the Revit version(e.g. 2018, 2019) to run against. -
Place the
.addin
of your Design Automation for Revit plugin in the same folder(C:\ProgramData\Autodesk\Revit\Addins\XXXX\
) as above.
DesignAutomationHandler does not expect to handle more than one addin for local testing/debugging.
To allow Revit loads your
.addin
correctly,DesignAutomationBridge.dll
should be in the same folder as your addin's dll is.
Starting Revit:
- If your addin needs to run on an input Revit model file, then open it in Revit or specify with startup argument
If you have json parameter defined to run the
WorkItem
in Design Automation, you can save json payload as a json file where your input file is at.
For example,
{"walls": false,"floors": true,"doors": true,"windows": true}
is saved asCountItParams.json
in the same folder where my input file locates.CountItParams
is the name of parameter I define in theActivity
for Design Automation.
-
Go to
Add-Ins
->External Tools
-> ClickDesignAutomationHandler
, your addin will get excuted! A dialog will pop up to tell the running result (if the runing succeeds the dialog will indicate where to find the output(s), it is supposed to be the folder where your input file is at) -
If you don't have input file to run on, after starting Revit, do 2 directly. If you have json parameter defined to run the
WorkItem
in Design Automation, there will be a dialog to instruct where to put the json file.
You can rerun the same addin without restarting Revit. But to run another addin, you need to following the step above to set it up.
Currently, the DesignAutomationHandler does not support multiple input files yet, as Design Automation does.
Documentation:
Desktop APIs:
Blog articles:
Please see the LICENSE file for full details.
Lijuan Zhu, Ashwin Shivashankar.