Hide Table of Contents
AddMenuPopupIcon3 Method (IFrame)

Adds an icon to a context-sensitive menu of a SOLIDWORKS add-in.

.NET Syntax

Visual Basic (Declaration) 
Function AddMenuPopupIcon3( _
   ByVal DocType As System.Integer, _
   ByVal SelectType As System.Integer, _
   ByVal HintString As System.String, _
   ByVal Identifier As System.Integer, _
   ByVal CallbackFunction As System.String, _
   ByVal CallbackUpdateFunction As System.String, _
   ByVal CustomNames As System.String, _
   ByVal ImageList As System.Object _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IFrame
Dim DocType As System.Integer
Dim SelectType As System.Integer
Dim HintString As System.String
Dim Identifier As System.Integer
Dim CallbackFunction As System.String
Dim CallbackUpdateFunction As System.String
Dim CustomNames As System.String
Dim ImageList As System.Object
Dim value As System.Boolean
 
value = instance.AddMenuPopupIcon3(DocType, SelectType, HintString, Identifier, CallbackFunction, CallbackUpdateFunction, CustomNames, ImageList)
C# 
System.bool AddMenuPopupIcon3( 
   System.int DocType,
   System.int SelectType,
   System.string HintString,
   System.int Identifier,
   System.string CallbackFunction,
   System.string CallbackUpdateFunction,
   System.string CustomNames,
   System.object ImageList
)
C++/CLI 
System.bool AddMenuPopupIcon3( 
&   System.int DocType,
&   System.int SelectType,
&   System.String^ HintString,
&   System.int Identifier,
&   System.String^ CallbackFunction,
&   System.String^ CallbackUpdateFunction,
&   System.String^ CustomNames,
&   System.Object^ ImageList
) 

Parameters

DocType
Document type whose context-sensitive menus display the icon
SelectType
Selection type whose context-sensitive menus display the icon
HintString
Text displayed in the SOLIDWORKS status bar when the user moves the pointer over the icon
Identifier
ID of the add-in; value of the Cookie argument passed by ISwAddin::ConnectToSW
CallbackFunction
Function called when user clicks the context-sensitive menu icon (see Remarks)
CallbackUpdateFunction
Optional function that controls the state of the icon; if specified, then SOLIDWORKS calls this function before displaying the icon

If CallbackUpdateFunction returns...

Then SOLIDWORKS...

0

Deselects and disables the item

1

Deselects and enables the item; this is the default state if no update function is specified

4

Hides the item
(see Remarks)
CustomNames
Names of custom feature types (see Remarks)
ImageList
Array of strings for the paths for the image files for the context-sensitive menu icon (see Remarks)

Return Value

True if the context-sensitive menu icon is added, false if not

Example

Remarks

See Add-in Callback and Enable Methods to learn how to specify CallbackFunction and CallbackUpdateFunction.

When the icon is clicked, the function specified in CallbackFunction can perform actions such as displaying a third-party pop-up menu.

CustomNames is a 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.

This method supports scaling for high resolution screens with high resolution operating system scaling options.

 

ImageList images can be:

  • 20 x 20 pixels
  • 32 x 32 pixels
  • 40 x 40 pixels
  • 64 x 64 pixels
  • 96 x 96 pixels
  • 128 x128 pixels 

Images should use 256-color palette.

 

See Also

Availability

SOLIDWORKS 2016 FCS, Revision Number 24.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:   AddMenuPopupIcon3 Method (IFrame)
*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) 2019 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.