Hide Table of Contents
OnMenuItem Method (IEdmMenu5)

Obsolete. Superseded by IEdmMenu7::OnMenuItem2.


Visual Basic (Declaration) 
Function OnMenuItem( _
   ByVal lItemID As System.Integer, _
   ByVal lParentWnd As System.Integer, _
   ByVal lCurrentFolderID As System.Integer, _
   ByVal poSelFiles As EdmSelectionList5, _
   ByVal poSelFolders As EdmSelectionList5 _
) As System.Integer
System.int OnMenuItem( 
   System.int lItemID,
   System.int lParentWnd,
   System.int lCurrentFolderID,
   EdmSelectionList5 poSelFiles,
   EdmSelectionList5 poSelFolders
System.int OnMenuItem( 
&   System.int lItemID,
&   System.int lParentWnd,
&   System.int lCurrentFolderID,
&   EdmSelectionList5^ poSelFiles,
&   EdmSelectionList5^ poSelFolders


ID of the selected menu item
Parent window handle (HWND)
ID of the currently active folder
List of selected files
List of selected folders

Return Value

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


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

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 files and folders do not satisfy the constraints set by the command author. See EdmMenuFlags sent to IEdmCmdMgr5::AddCmd.

See Also


Version 5.2 of SOLIDWORKS PDM Professional

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

Subject:   Feedback on Help Topics
Page:   OnMenuItem Method (IEdmMenu5)
*   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:


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

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.