Adding new buttons via macro

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

Reply to
ben
Loading thread data ...

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

TOP

Reply to
Paul B. Kellner

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

Reply to
Engineer

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

Reply to
ben

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.