Macro to turn on and off add ins

Dec 01, 2005 3 Replies

I would like to do a macro to turn on and shut off addins in my solidworks. Anybody have any ideas.



How would this be any simpler than going to "Tools --> Addins"?

Um.. use the Solidwroks office toolbar?

unless your referring to other addins that are on the office toolbar.

Hope that helps SteveT.

How about this one... Got it from NG bout two years back... cant remember from who....

Just modify the path to your add-in DLL... works fine here.

---------------------------------

Dim swApp As Object

Dim RetVal As Long

'Path to the add in DLL for your application Const strAddInPath As String = "C:\the_path_to_your_addin"

Sub main()

Set swApp = Application.SldWorks If Not swApp Is Nothing Then RetVal = swApp.LoadAddIn(strAddInPath) 'Load Add in If RetVal = 2 Then 'add in already loaded 'Unload the add in swApp.UnloadAddIn strAddInPath End If End If Set swApp = Application.SldWorks End Sub

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required