Execute Method


Executes the macro.

Namespace: Autodesk.Revit.DB.Macros
Assembly: RevitAPIMacros (in RevitAPIMacros.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014

Syntax

C#
public void Execute()
Visual Basic
Public Sub Execute
Visual C++
public:
void Execute()

Exceptions

Exception Condition
Autodesk.Revit.Exceptions 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