LookupPostableCommandId Method


Looks up and retrieves the Revit command id with the given id string.

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

Syntax

C#
public static RevitCommandId LookupPostableCommandId(
	PostableCommand postableCommand
)
Visual Basic
Public Shared Function LookupPostableCommandId ( _
	postableCommand As PostableCommand _
) As RevitCommandId
Visual C++
public:
static RevitCommandId^ LookupPostableCommandId(
	PostableCommand postableCommand
)

Parameters

postableCommand
Type: Autodesk.Revit.UIPostableCommand
The postable command.

Return Value

The Revit command id. Returning a null reference (Nothing in Visual Basic) if a command with the given name was not found.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullExceptionThrown when name is a null reference (Nothing in Visual Basic).

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →