There are two common development approaches for Revit: external commands and external applications. Both interfaces are included in the Revit API.dll package.
External Command
Plugin developers can integrate their applications through the external command interface IExternalCommand. Revit recognizes external plugins via .addin files, and plugins can also be loaded directly using the Addin tool.
Using the external command design allows plugins to be re-invoked without restarting Revit, which simplifies debugging during plugin development. For this reason, the external command approach is adopted in the early stages of plugin design in this article.
The main modules developed include:
- Automatic creation of axis network
- Automatic generation of basic models
- Parameter modification module for ANSYS
- Data export module
- Unreinforced extended basic calculation and verification module
- Extended basic calculation and verification module
- Automatic reinforcement module
Each module is implemented by creating a class based on the IExternalCommand interface and compiling it into a .dll file.
The IExternalCommand interface defines a single abstract method, Execute(), which can be overloaded to implement the command’s functionality. This Execute() method serves as the main entry point of the external command and accepts three parameters: commandData, message, and elements.
commandData is typically used to access the current Revit document being operated on. message is used to return error messages during execution. If the external command returns a status of Failed or Cancelled and the message parameter is not empty, the elements specified by the elements parameter will be highlighted in Revit.
External Application
Alternatively, developers can create applications using the external application interface IExternalApplication. Like external commands, Revit detects external plugins through .addin files.
The IExternalApplication interface defines two abstract methods: OnStartup() and OnShutdown(). Developers can override these methods to customize behavior when Revit starts and shuts down.
In this article, the focus is on using the OnStartup() method to automatically load the “Basic Creation Module” tab and its buttons into the Revit toolbar upon startup. Clicking these buttons will trigger the corresponding IExternalCommand plugins created earlier.
To have the “Basic Creation Module” tab appear in the toolbar on startup, the necessary code must be placed within the OnStartup() method. Each module’s .dll file is assigned a button within this tab, allowing users to invoke the associated functionality directly by clicking the button.
















Must log in before commenting!
Sign Up