YP69
1
Hi all
I use a macro with a userform containing a list of choices to modify the solidworks options according to the choice of the userform.
1. I'm looking to set 2 paths of the design library in the solidworks options via a macro
My two paths:
C:\sw-parameter\Design Library
C:\04 BOOKCASES\SW\Design Bookcase
I use this command line to assign a path.
boolstatus = swApp.SetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDesignLibrary, "C:\parametre-sw\Biblio design")
I don't see how to put two paths, do you have an idea?
2. I'm looking to refresh the design library in the
Thank you in advance.
Kind regards
Yannick
Hello. Try this:
boolstatus = swApp.SetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDesignLibrary, "C:\parametre-sw\Biblio conception;C:\04 BIBLIOTHEQUES\SW\Bibliotheque conception")
YP69
3
Hello
I have just found for point n° 1, we must add a "; " between the different paths
boolstatus = swApp.SetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsDesignLibrary, "C:\sw-parameter\Biblio design; C:\sw-parameter")
On the other hand, I'm still stuck on point N°2: Refresh the design library
Anyone have an idea of which command line to use?
Thank you in advance for your feedback
YP69
4
Thank you Jerome, for your feedback, it confirms that the line of code I had added was the right one.
On the other hand, I'm still stuck on point 2 : Refresh the design library.
Do you have an idea?
Thank you in advance.
Try:
swApp.RefreshTaskpaneContent()
Link