PostCommand Method


UIApplication Post Command 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: 25.0.0.0 (25.0.0.0)
Syntax
public void PostCommand(
	RevitCommandId commandId
)

Parameters

commandId RevitCommandId
The command Id.
Exceptions
Exception Condition
ArgumentNullException Thrown when commandId is .
ArgumentException If the command cannot be posted.
InvalidOperationException If there is a command already been posted.
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →