Macro to turn on and off add ins
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Macro to turn on and off add ins

 
Post new topic   Reply to topic    CADForums.net Forum Index -> SolidWorks
Author Message
IL_Bow_Man
Guest





Posted: Fri Dec 02, 2005 1:10 am    Post subject: Macro to turn on and off add ins Reply with quote

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

Back to top
That70sTick
Guest





Posted: Fri Dec 02, 2005 1:10 am    Post subject: Re: Macro to turn on and off add ins Reply with quote

How would this be any simpler than going to "Tools --> Addins"?
Back to top
SteveT
Guest





Posted: Fri Dec 02, 2005 1:10 am    Post subject: Re: Macro to turn on and off add ins Reply with quote

Um.. use the Solidwroks office toolbar?

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

Hope that helps
SteveT.


"IL_Bow_Man" <madohman@home-shield.com> wrote in message
news:1133474816.385455.85260@g49g2000cwa.googlegroups.com...
Quote:
I would like to do a macro to turn on and shut off addins in my
solidworks. Anybody have any ideas.


Back to top
Kvick
Guest





Posted: Fri Dec 02, 2005 9:10 am    Post subject: Re: Macro to turn on and off add ins Reply with quote

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


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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> SolidWorks All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB