Adding new buttons via macro

Dec 29, 2008 3 Replies

I started to write our setup procedures for adding toolbar buttons for some of our standard macros and I got to thinking... hey wouldn't be cool if I could write a macro that setup all the standard macros for a new user? This opened a whole frustrating afternoon of looking through the Solidworks API.


  1. Is it possible to record macros when customizing the toolbar? It doesn't seem to record anything when I do it, but I didn't know if there was a way to force it to.
  2. My most promising line of attack came when reading about people who create whole new toolbars for addins using addToolbarCommand2, but I want to add it to an existing toolbar. To do this I need something called a Cookie, but I don't see a way to get a cookie for an existing toolbar.

Any help would be greatly appreciated!



Ben


Why not use the configuration saving utility after setting up the toolbars the way you want them?

TOP

Use Copy Settings Wizard and create a setting for the macro toolbar. Put the macros and the swsettings.sldreg in a common folder and you can ask the user to run the file once.

Deepak

Thanks. This might be a better (and simpler) solution!

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required