IMenuItem Interface

IMenuItem Interface | Send Feedback
See Also Members

Allows access to a menu item.

# Syntax

Visual Basic |
--- | ---
    Public Interface IMenuItem

C# |
--- | ---
    public interface IMenuItem

JavaScript |
--- | ---
    Object dsMenuItem

COM native C++ |
--- | ---
    interface IMenuItem

C++ |
--- | ---
    class dsMenuItem

# Example

The following code snippets show how to add a menu item to DraftSight's main menu:

- COM native C++ (from the DraftSight API COM native C++ template file DsAddinConnection.cpp)
- C++ (from the DraftSight API C++ template file dsAddinConnection.cpp)

#### COM native C++

> IMenuItemPtr pMenu = m_DsApp->AddMenu( m_sApiUuid, dsUIState_Document, MENU_POSITION, L"DsAddin" );

#### C++

> dsMenuItem_ptr pMenu;

> dsApp->AddMenu(myApplication::appID, dsUIState_Document, MENU_POSITION, UserCommandName, &pMenu);

# Accessors

IApplication::AddMenu

IApplication::GetMenuItems

IMenuItem::GetMenuItems

IMenuItem::InsertMenuItem

# Object Model

Application

# See Also

####

IMenuItem Members
Interop.dsAutomation Namespace
IContextMenuItem Interface