Add-in Series 2 – Create SolidWorks Add-in without the SDK [VIDEO]

Article by Adam Bridgman, CSWE updated January 7, 2014


Creating an add-in from the SDK is very quick and easy, but it requires the full version of visual studio to utilize. An alternative to that is to download a source project created by the SDK without modifications and then make the changes below. The files can be downloaded here.

This is how to customize an add-in:

  1. Open SwAddin.vb
  2. Change the Guid, there are many tools to generate Guids, I like this one.
  3. Change the description and title to values that you would like to see for the add-in




  1. Expand the region ISwAddin Implementation and comment out the following lines

Function ConnectToSW(ByVal ThisSW As Object, ByVal Cookie As Integer) As Boolean Implements ISwAddin.ConnectToSW

        iSwApp = ThisSW

        addinID = Cookie

       ‘ Setup callbacks

        ‘iSwApp.SetAddinCallbackInfo(0, Me, addinID)

        ‘ Setup the Command Manager

        ‘iCmdMgr = iSwApp.GetCommandManager(Cookie)


        ‘Setup the Event Handlers

        ‘SwEventPtr = iSwApp

        ‘openDocs = New Hashtable


        ‘Setup Sample Property Manager


        ConnectToSW = True

End Function

Note: you do not have to remove all of these, only remove the unnecessary items (in this example I do not require a command manager, I do not react to SolidWorks events, and I do not use a property manager page, so all of them will be removed).


  1. Comment out the corresponding lines for the disconnect event

       Function DisconnectFromSW() As Boolean Implements ISwAddin.DisconnectFromSW





        ‘iCmdMgr = Nothing


        iSwApp = Nothing

        ‘The addin _must_ call GC.Collect() here in order to retrieve all managed code pointers





        DisconnectFromSW = True

End Function


Related Links

Certified SOLIDWORKS Services available from Javelin

Javelin can help you to:

Adam Bridgman, CSWE

Adam Bridgman in SOLIDWORKS Certified Expert proving customers with technical support and training