<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
CreatePluginMenu2 Method (IEdmVault12)
See Also Example

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmVault12 Interface : CreatePluginMenu2 Method (IEdmVault12)

Visual Basic
C#
C++/CLI

lInsertPosition
  Zero-based index of position in menu where new items are inserted; -1 to append new menu items to the bottom of the menu

plStartID
  Menu command ID to assign new commands when this method is called; next available menu command ID after this method returns

poSelObjects
  IEdmSelectionList6; selected objects for which to display the menu

plItemCount
  Number of menu command items added

Inserts into a menu with the specified handle all of the menu commands registered by the SOLIDWORKS PDM Professional add-ins.

# Syntax

Visual Basic |
--- | ---

    Function CreatePluginMenu2( _
       ByVal hMenu As System.Integer, _
       ByVal lInsertPosition As System.Integer, _
       ByRef plStartID As System.Integer, _
       ByVal poSelObjects As IEdmSelectionList6, _
       ByVal lCreateMenuFlags As System.Integer, _
       ByRef plItemCount As System.Integer _
    ) As IEdmMenu7

C# |
--- | ---

    IEdmMenu7 CreatePluginMenu2(
       System.int hMenu,
       System.int lInsertPosition,
       out System.int plStartID,
       IEdmSelectionList6 poSelObjects,
       System.int lCreateMenuFlags,
       out System.int plItemCount
    )

C++/CLI |
--- | ---

    IEdmMenu7^ CreatePluginMenu2(
    &   System.int hMenu,
    &   System.int lInsertPosition,
    &   [Out] System.int plStartID,
    &   IEdmSelectionList6^ poSelObjects,
    &   System.int lCreateMenuFlags,
    &   [Out] System.int plItemCount
    )

#### Parameters

hMenu
  Handle of menu in which to insert command items
lInsertPosition
  Zero-based index of position in menu where new items are inserted; -1 to append new menu items to the bottom of the menu
plStartID
  Menu command ID to assign new commands when this method is called; next available menu command ID after this method returns
poSelObjects
  IEdmSelectionList6; selected objects for which to display the menu
lCreateMenuFlags
  Combination of CreateMenuFlags bits
plItemCount
  Number of menu command items added

#### Return Value

IEdmMenu7 (see Remarks)

# Example

Display Menu of Commands (VB.NET)

# Remarks

This method supersedes IEdmVault5::CreatePluginMenu by adding the ability to insert a menu for object types other than files and folders (e.g., items).

Use the returned interface to call IEdmMenu7::OnMenuItem2 when the user selects one of the command items added by this method.

Return codes:

- S_OK: The method successfully executed.

# See Also

####

IEdmVault12 Interface
IEdmVault12 Members

# Availability

SOLIDWORKS PDM Professional 2011