Specifies the application functions to call when a toolbar button is clicked or sets a separator.
.NET Syntax
Visual Basic (Usage) | |
---|
Dim instance As ISldWorks
Dim Cookie As System.Integer
Dim ToolbarId As System.Integer
Dim ToolbarIndex As System.Integer
Dim ButtonCallback As System.String
Dim ButtonEnableMethod As System.String
Dim ToolTip As System.String
Dim HintString As System.String
Dim value As System.Boolean
value = instance.AddToolbarCommand2(Cookie, ToolbarId, ToolbarIndex, ButtonCallback, ButtonEnableMethod, ToolTip, HintString) |
Parameters
- Cookie
Resource ID of the toolbar; this is the same cookie that you specified in ISwAddin::ConnectToSW
- ToolbarId
Toolbar ID from ISldWorks::AddToolbar5
- ToolbarIndex
0-based index of the bitmap button
- ButtonCallback
Function called when the user clicks the button (see Remarks)
- ButtonEnableMethod
Function called to check whether the button should be enabled; typically used to check the type of object selected (see Remarks)
- ToolTip
ToolTip for the toolbar button
- HintString
Text that SOLIDWORKS displays in the status bar when the user moves their mouse over this toolbar button
Return Value
True if successful, false if unsuccessful
Example
Remarks
See Also
Availability
SOLIDWORKS 2001Plus FCS, Revision Number 10.0