Hide Table of Contents
RemoveMenuPopupItem2 Method (ISldWorks)

Removes an item on a pop-up (shortcut) menu.

.NET Syntax

Visual Basic (Declaration) 
Function RemoveMenuPopupItem2( _
   ByVal DocumentType As Integer, _
   ByVal Cookie As Integer, _
   ByVal SelectType As Integer, _
   ByVal PopupItemName As String, _
   ByVal MenuCallback As String, _
   ByVal MenuEnableMethod As String, _
   ByVal HintString As String, _
   ByVal CustomNames As String _
) As Boolean
Visual Basic (Usage) 
Dim instance As ISldWorks
Dim DocumentType As Integer
Dim Cookie As Integer
Dim SelectType As Integer
Dim PopupItemName As String
Dim MenuCallback As String
Dim MenuEnableMethod As String
Dim HintString As String
Dim CustomNames As String
Dim value As Boolean
 
value = instance.RemoveMenuPopupItem2(DocumentType, Cookie, SelectType, PopupItemName, MenuCallback, MenuEnableMethod, HintString, CustomNames)
C# 
bool RemoveMenuPopupItem2( 
   int DocumentType,
   int Cookie,
   int SelectType,
   string PopupItemName,
   string MenuCallback,
   string MenuEnableMethod,
   string HintString,
   string CustomNames
)
C++/CLI 
bool RemoveMenuPopupItem2( 
&   int DocumentType,
&   int Cookie,
&   int SelectType,
&   String^ PopupItemName,
&   String^ MenuCallback,
&   String^ MenuEnableMethod,
&   String^ HintString,
&   String^ CustomNames
) 

Parameters

DocumentType
Document type as defined in swDocumentTypes_e
Cookie

Cookie specified in ISwAddin::ConnectToSW

SelectType

Selection type as defined in swSelectType_e

PopupItemName

Description displayed on the shortcut menu

MenuCallback

Function to call when the user clicks your menu item (see description in ISldWorks::AddMenuItem3)

MenuEnableMethod

Optional function that controls the state of the menu item

If specified, SolidWorks:

  • Calls this function before displaying the menu

  • Display of the menu item is controlled by the return value of MenuEnableMethod

If your method returns...

 

Then SolidWorks...

0

Deselects and disables the menu item

1

Deselects and enables the menu item. This is the default menu state with if no update function is specified

2

Selects and disables the menu item

3

Selects and enables the menu item

HintString

Text to show in the SolidWorks status bar when the user moves their mouse over this menu item; if you specify a HintString, it must be preceded by a comma

CustomNames

Semi-colon separated list of the names of the custom feature types. This argument is applicable only if SelectType is a custom feature type (like swSelATTRIBUTES); in the case of swSelATTRIBUTES, set this field to the name of the attribute definition

Return Value

True if the item was removed, false if not

Remarks

The enumeration swDocNONE is not valid for DocumentType.
 

See Also

Availability

SolidWorks 2003 FCS, Revision Number 11.0


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:   RemoveMenuPopupItem2 Method (ISldWorks)
*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) 2012 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.