Visual Basic | |
---|---|
Public Interface IMenuItem |
C# | |
---|---|
public interface IMenuItem |
JavaScript | |
---|---|
Object dsMenuItem |
COM native C++ | |
---|---|
interface IMenuItem |
C++ | |
---|---|
class dsMenuItem |
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);