Adding new buttons via macro

Discussion in 'SolidWorks' started by ben, Dec 29, 2008.

  1. ben

    ben Guest

    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
     
    ben, Dec 29, 2008
    #1
  2. On Mon, 29 Dec 2008 13:51:54 -0800, ben wrote:



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

    TOP
     
    Paul B. Kellner, Dec 30, 2008
    #2
  3. ben

    Engineer Guest

    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
     
    Engineer, Dec 30, 2008
    #3
  4. ben

    ben Guest

    Thanks. This might be a better (and simpler) solution!
     
    ben, Dec 30, 2008
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.