Specifies the application functions to be called when a toolbar button is pressed or sets a separator.
.NET Syntax
Visual Basic (Usage) | |
---|
Dim instance As ISldWorks
Dim Cookie As Integer
Dim ToolbarId As Integer
Dim ToolbarIndex As Integer
Dim ButtonCallback As String
Dim ButtonEnableMethod As String
Dim ToolTip As String
Dim HintString As String
Dim value As Boolean
value = instance.AddToolbarCommand2(Cookie, ToolbarId, ToolbarIndex, ButtonCallback, ButtonEnableMethod, ToolTip, HintString)
|
Parameters
- Cookie
Resource ID of the toolbar. This is the same Cookie you specified in ISwAddin::ConnectToSW
- ToolbarId
Toolbar ID from SldWorks::AddToolbar4
- 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 or not 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