Add Task Pane View Example (VBA)
This example shows how to add a tab to the Task Pane.
'---------------------------------------------------------------------------
' Preconditions: Verify that the bitmap file exists.
'
' Postconditions:
' 1. Displays a tab with the specified bitmap on the Task Pane.
' 2. Examine the Task Pane.
'---------------------------------------------------------------------------
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim ctrl As SldWorks.TaskpaneView
Dim bitmap(0) As String
Dim toolTip As String
Sub main()
Set swApp = Application.SldWorks
bitmap(0) =
"C:\Users\Public\Documents\SOLIDWORKS\SOLIDWORKS 2018\samples\tutorial\api\addin\pm_extruded_block.bmp"
toolTip = "Extruded block tab"
Set ctrl = swApp.CreateTaskpaneView3(bitmap, toolTip)
End Sub