Removes a MacroModule from the application or document.
Namespace: Autodesk.Revit.DB.MacrosAssembly: RevitAPIMacros (in RevitAPIMacros.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2014
Syntax
C# |
---|
public void RemoveModule( MacroModule module ) |
Visual Basic |
---|
Public Sub RemoveModule ( _ module As MacroModule _ ) |
Visual C++ |
---|
public: void RemoveModule( MacroModule^ module ) |
Parameters
- module
- Type: Autodesk.Revit.DB.Macros..::..MacroModule
The module will be removed.
Remarks
Note: document-level modules will not be removed to the document until the document is saved.
Thus this operation is not undoable and does not require an open transaction even for document-level modules.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The given module is not a member of this collection. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown when the given module is a UI module. |