GetID Method (IUserCommand) Send Feedback
See Also  Example
UserCmdID[out]
User command's ID (see Remarks)
Gets the user command's ID.

Syntax

Visual Basic 
Function GetID() As System.String
C# 
System.string GetID()
JavaScript 
GetID() : String
COM native C++ 
HRESULT GetID(
   BSTR* UserCmdID
)  
C++ 
DSRESULT GetID(
   dsString* UserCmdID
)  

Parameters

UserCmdID[out] or Return Value
User command's ID (see Remarks)

Example

This code snippet shows how to get the user command's ID (from the DraftSight API COM native C++ template files DsAddinUserCommand.h and DsAddinUserCommand.cpp).

COM native C++

DsAddinUserCommand.h 

bstr_t GetUserCommandID();

  

DsAddinUserCommand.cpp 

bstr_t DsAddinUserCommand::GetUserCommandID()
{
    return
m_DsUserCommand->GetID();
}

 

Example

Remarks

The return value is the string specified for IMenuItem::InsertMenuItem's or IToolBar::InsertToolBarItem's UserCmdID parameter.
 

See Also

Availability

DraftSight V1R1