MacroExecute 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
ExceptionCondition
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