RemoveModule Method


Removes a MacroModule from the application or document.

Namespace: Autodesk.Revit.DB.Macros
Assembly: 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.MacrosMacroModule
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

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The given module is not a member of this collection.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Thrown when the given module is a UI module.

See Also