Execute Method


Macro Execute Method

Executes the macro.

Namespace: Autodesk.Revit.DB.Macros
Assembly: RevitAPIMacros (in RevitAPIMacros.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void Execute()
Exceptions
Exception Condition
InvalidOperationException Thrown if the module is a document module and the Macro is disabled for the document, or there is a open transaction of the entrypoint's document, or the transaction mode assinged to this macro module assigned is invalid for the entrypoint's document, such as ReadOnly or Automatic transaction mode for the entrypoint without document, or this is a DB module macro but be executed in UI environment, or macro failed to execute.
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →