AutomationServiceHandler is a Revit addin that allows users to run and debug their Revit Automation application locally using desktop Revit.
- APS Account: Learn how to create a APS Account, activate your subscription, and create an app at this tutorial.
- Visual Studio: 2022 or newer
- .NET Framework or .NET Core basic knowledge with C#
- Revit: required for compiling plugin changes
-
Build the solution
AutomationServiceHandler, compiling AutomationServiceHandler for Revit 2023 (AutomationServiceHandler2023), Revit 2024 (AutomationServiceHandler2024), Revit 2025 (AutomationServiceHandler2025), Revit 2026 (AutomationServiceHandler2026), and Revit 2027 (AutomationServiceHandler2027)Revit Automation API currently supports Revit 2023, 2024, 2025, 2026, and 2027.
AutomationServiceHandler2027targets .NET 10 (net10.0-windows) to match the Revit 2027 API. Install the .NET 10 SDK (or a Visual Studio version that includes it) before building that project. -
Copy/paste the
AutomationServiceHandler.addininto the "Addins" folderC:\ProgramData\Autodesk\Revit\Addins\XXXX\, whereXXXXis the Revit version (e.g. 2023, 2024, 2025, 2026, 2027) you intend to run.Note. Currently, we remained old brand name in the name of assembly and *.addin file during the transition period. Will change them in the future.
The assembly name is still
DesignAutomationHandler.dlland hasn't migrated toAutomationServiceHandler.dll.The addin filename is still
DesignAutomationHandler.addinand hasn't migrated toAutomationServiceHandler.addin. -
Copy/paste the
.addinfile of your Revit Automation plugin into the same folderC:\ProgramData\Autodesk\Revit\Addins\XXXX\.AutomationServiceHandler doesn't support local testing/debugging of more than one addin at a time.
Revit needs the
DesignAutomationBridge.dllto be in the same folder as your addin's dlls.
Starting Revit:
-
If your addin requires an input Revit model at startup, then open the file in Revit before running the addin or specify the file using a startup argument.
If you have json parameter defined to run the
WorkItemin Automation Service, you can save the json payload as a json file in the same folder as your input Revit file.For example: if
CountItParamsis the name of the parameter defined in yourActivityof the Automation Service, then you should create a fileCountItParams.jsonwith contents{"walls": false,"floors": true,"doors": true,"windows": true}and save it to the folder which contains your input Revit model. -
In the Revit ribbon, navigate to the
Add-Instab, then clickExternal Tools, and click theAutomationServiceHandlercommand. Your addin will by executed! A dialog will pop-up to report the execution result. If the execution was successful, the dialog will indicate where you can find the output(s). They go to the folder which contained your input files. -
If your plugin doesn't require any input files, start Revit and run the
AutomationServiceHandlercommand without any additional setup. If you have json parameter defined to run theWorkItemin Automation Service, a dialog will instruct you where to put your json file.You can rerun the same addin without restarting Revit.
To run different addin, repeat the setup steps above.
Currently, the AutomationServiceHandler doesn't support multiple input files. (This feature is supported by Automation Service on APS.)
Documentation:
Desktop APIs:
Blog articles:
Please see the LICENSE file for full details.
Lijuan Zhu and Ashwin Shivashankar
Developer Advocacy and Support
Autodesk
http://aps.autodesk.com