InsertMenuItem Method (IContextMenuItem)

InsertMenuItem Method (IContextMenuItem) | Send Feedback
See Also

ContextMenuItem[out]
  Context-sensitive menu item

ApiUuid
  UUID of the add-in or non add-in application

ItemType
  Type of context-sensitive menu item to insert as defined in dsMenuItemType_e

Position
  1-based index indicating where to insert the context-sensitive menu item

ItemName
  Name of the context-sensitive menu item

UserCmdID
  User-defined command ID when ItemType is dsMenuItemType_e.dsMenuItemType_UserCommand

Inserts a context-sensitive menu item for this context-sensitive menu item.

# Syntax

Visual Basic |
--- | ---
    Function InsertMenuItem( _
       ByVal ApiUuid As System.String, _
       ByVal ItemType As dsMenuItemType_e, _
       ByVal Position As System.Integer, _
       ByVal ItemName As System.String, _
       ByVal UserCmdID As System.String _
    ) As ContextMenuItem

C# |
--- | ---
    ContextMenuItem InsertMenuItem(
       System.string ApiUuid,
       dsMenuItemType_e ItemType,
       System.int Position,
       System.string ItemName,
       System.string UserCmdID
    )

JavaScript |
--- | ---
    InsertMenuItem(
       ApiUuid : String,
       ItemType : String,
       Position : Number,
       ItemName : String,
       UserCmdID : String
    ) : dsContextMenuItem

COM native C++ |
--- | ---
    HRESULT InsertMenuItem(
       BSTR ApiUuid,
       dsMenuItemType_e ItemType,
       LONG Position,
       BSTR ItemName,
       BSTR UserCmdID,
       IContextMenuItem** ContextMenuItem
    )

C++ |
--- | ---
    DSRESULT InsertMenuItem(
       const dsString& ApiUuid,
       dsMenuItemType_e ItemType,
       long Position,
       const dsString& ItemName,
       const dsString& UserCmdID,
       dsContextMenuItem** ContextMenuItem
    )

#### Parameters

ApiUuid
  UUID of the add-in or non add-in application
ItemType
  Type of context-sensitive menu item to insert as defined in dsMenuItemType_e
Position
  1-based index indicating where to insert the context-sensitive menu item
ItemName
  Name of the context-sensitive menu item
UserCmdID
  User-defined command ID when ItemType is dsMenuItemType_e.dsMenuItemType_UserCommand
ContextMenuItem[out] or Return Value
  Context-sensitive menu item

# See Also

####

IContextMenuItem Interface
IContextMenuItem Members
IContextMenuItem::GetMenuItems Method ()
IContextMenuItem::Remove Method ()
IContextMenuItem::Enabled Property ()

# Availability

DraftSight V1R5.0