PostCommand Method



Posts the command to the Revit message queue to be invoked when control returns from the current API context.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 17.0.0.0 (17.0.484.0)
Since:  2014

Syntax

C#
public void PostCommand(
	RevitCommandId commandId
)
Visual Basic
Public Sub PostCommand ( _
	commandId As RevitCommandId _
)
Visual C++
public:
void PostCommand(
	RevitCommandId^ commandId
)

Parameters

commandId
Type: Autodesk.Revit.UI..::..RevitCommandId
The command Id.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentNullExceptionThrown when commandId is nullNothingnullptra null reference (Nothing in Visual Basic).
Autodesk.Revit.Exceptions..::..ArgumentExceptionIf the command cannot be posted.
Autodesk.Revit.Exceptions..::..InvalidOperationException If there is a command already been posted.

See Also

Online Documentation for the Revit API | Gui Talarico