| Revit 2016 API |
| RevitCommandId..::..LookupCommandId Method |
| RevitCommandId Class See Also |
Looks up and retrieves the Revit command id with the given id string.
Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 16.0.0.0 (16.0.0.0)
Since: 2013
Syntax
| C# |
|---|
public static RevitCommandId LookupCommandId( string name ) |
| Visual Basic |
|---|
Public Shared Function LookupCommandId ( _ name As String _ ) As RevitCommandId |
| Visual C++ |
|---|
public: static RevitCommandId^ LookupCommandId( String^ name ) |
Parameters
- name
- Type: System..::..String
The Revit command name. Refer to the entries in the Revit journal to find the string to use for a particular command.
Return Value
The Revit command id. Returning nullNothingnullptra null reference (Nothing in Visual Basic) if a command with the given name was not found.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when name is nullNothingnullptra null reference (Nothing in Visual Basic). |
| Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when the given name is empty. |