Hide Table of Contents
OnMenuItem2 Method (IEdmMenu7)

Executes the command for the selected menu item.

Syntax

Visual Basic (Declaration) 
Function OnMenuItem2( _
   ByVal lItemID As System.Integer, _
   ByVal lParentWnd As System.Integer, _
   ByVal lCurrentFolderID As System.Integer, _
   ByVal poSelObjects As IEdmSelectionList6 _
) As System.Integer
C# 
System.int OnMenuItem2( 
   System.int lItemID,
   System.int lParentWnd,
   System.int lCurrentFolderID,
   IEdmSelectionList6 poSelObjects
)
C++/CLI 
System.int OnMenuItem2( 
&   System.int lItemID,
&   System.int lParentWnd,
&   System.int lCurrentFolderID,
&   IEdmSelectionList6^ poSelObjects
) 

Parameters

lItemID
ID of the selected menu item
lParentWnd
Parent window handle (HWND)
lCurrentFolderID
ID of currently active folder
poSelObjects
List of selected objects (files, folders, items, etc.)

Return Value

User-interface elements that should be refreshed as defined in EdmRefreshFlag 

Example

Remarks

You should call this method when a user selects a menu item belonging to this menu.

NOTE: This method supersedes IEdmMenu5::OnMenuItem, which only works with files and folders. IEdmMenu7::OnMenuItem2 works with files and folders as well as other object types such as items.

Return codes:

  • S_OK: The method successfully executed.
  • S_FALSE: Menu item does not belong to this menu.
  • S_EDM_MENU_ITEM_NOT_APPLICABLE: The current selection of objects do not satisfy the constraints set by the command author. See EdmMenuFlags sent to IEdmCmdMgr5::AddCmd.
 

See Also

Availability

SOLIDWORKS PDM Professional 2011


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   OnMenuItem2 Method (IEdmMenu7)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2018 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.