AddDefaultContextMenu Method (IApplication) Send Feedback
See Also  Example
ContextMenuItem[out]
Context-sensitive menu item for DraftSight
ApiUuid
UUID of the add-in or non add-in application
ItemType
Type of menu item as defined in dsMenuItemType_e
ItemName
Name of the menu item
UserCmdID
User-defined command ID when ItemType is dsMenuItemType_e.dsMenuItemType_UserCommand
Adds a menu item to the DraftSight default context-sensitive menu.

Syntax

Visual Basic 
Function AddDefaultContextMenu( _
   ByVal ApiUuid As System.String, _
   ByVal ItemType As dsMenuItemType_e, _
   ByVal ItemName As System.String, _
   ByVal UserCmdID As System.String _
) As ContextMenuItem
C# 
ContextMenuItem AddDefaultContextMenu( 
   System.string ApiUuid,
   dsMenuItemType_e ItemType,
   System.string ItemName,
   System.string UserCmdID
)
JavaScript 
AddDefaultContextMenu( 
   ApiUuid : String,
   ItemType : String,
   ItemName : String,
   UserCmdID : String
) : dsContextMenuItem
COM native C++ 
HRESULT AddDefaultContextMenu( 
   BSTR ApiUuid,
   dsMenuItemType_e ItemType,
   BSTR ItemName,
   BSTR UserCmdID,
   IContextMenuItem** ContextMenuItem
) 
C++ 
DSRESULT AddDefaultContextMenu( 
   const dsString& ApiUuid,
   dsMenuItemType_e ItemType,
   const dsString& ItemName,
   const dsString& UserCmdID,
   dsContextMenuItem** ContextMenuItem
) 

Parameters

ApiUuid
UUID of the add-in or non add-in application
ItemType
Type of menu item as defined in dsMenuItemType_e
ItemName
Name of the menu item
UserCmdID
User-defined command ID when ItemType is dsMenuItemType_e.dsMenuItemType_UserCommand
ContextMenuItem[out] or Return Value
Context-sensitive menu item for DraftSight

Example

Remarks

The DraftSight context-sensitive menu appears if a user presses the right-mouse button when:

  • the cursor is anywhere in a drawing,
  • an entity is not selected, and 
  • a command is not running.
 

See Also

Availability

DraftSight V1R5.0