Adds an icon to a context-sensitive menu of a SolidWorks add-in.
.NET Syntax
Visual Basic (Usage) | |
---|
Dim instance As IFrame
Dim DocType As Integer
Dim SelectType As Integer
Dim HintString As String
Dim Identifier As Integer
Dim CallbackFunction As String
Dim CallbackUpdateFunction As String
Dim CustomNames As String
Dim BitmapFilePath As String
Dim value As Boolean
value = instance.AddMenuPopupIcon2(DocType, SelectType, HintString, Identifier, CallbackFunction, CallbackUpdateFunction, CustomNames, BitmapFilePath)
|
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 mouse 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)
- BitmapFilePath
- Path and filename of the bitmap for the context-sensitive menu icon
Return Value
True if the context-sensitive menu icon is added, false if not
Example
Remarks
See Also
Availability
SolidWorks 2011 FCS, Revision Number 19.0