Skip to content

CommandMenuItem

Public Class

A class representing a single command menu item.

Inheritance Hierarchy

System.Object
Autodesk.Revit.UI.MenuItem
Autodesk.Revit.UI.CommandMenuItem

Namespace: Autodesk.Revit.UI

Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public class CommandMenuItem : MenuItem

The CommandMenuItem type exposes the following members.

Constructors

Name

Description


Public Method
CommandMenuItem

Initialize the item data.


Properties

Name

Description


Public Property
IsValidObject

Specifies whether the .NET object represents a valid Revit entity.
(Inherited from MenuItem)


Methods

Name

Description


Public Method

(Inherited from MenuItem)


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method
SetAvailabilityClassName

Set availabilityClassName of CommandMenuItem


Public Method

Set toolTip of CommandMenuItem


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)


Remarks

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.