Command |
A class representing a single command menu item.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)

The CommandMenuItem type exposes the following members.

Name | Description | |
---|---|---|
![]() | CommandMenuItem | Initialize the item data. |

Name | Description | |
---|---|---|
![]() | IsValidObject | Specifies whether the .NET object represents a valid Revit entity. (Inherited from MenuItem ) |

Name | Description | |
---|---|---|
![]() | Dispose | (Inherited from MenuItem ) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object ) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object ) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object ) |
![]() | SetAvailabilityClassName | Set availabilityClassName of CommandMenuItem |
![]() | SetToolTip | Set toolTip of CommandMenuItem |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object ) |

To add a menu item that can be executed, implement IExternalCommand interface and pass external command class name to CommandMenuItem constructor, create the CommandMenuItem object and use AddItem() method to add the object to context menu.
