3 Replies Latest reply on Mar 6, 2017 5:16 PM by Alexander Klammer

    How to add add-in button to existing command bar tab?

    Nilesh Patel

      Hi All,

       

      I have created couple of Solidworks Add-in using Solidworks SDK template. But when I deploy the add-ins, they create their own command bar tab. I have searched a lot on google but failed to get some information.

       

      It make sense to add both buttons to one command bar tab rather than having each button on separate command bar tab. One way to achieve this is by merging codes for both add-ins into one and then you can crate multiple buttons on same command bar. But in future, if one of the button is no longer required and you try to uninstall the add-in, it will uninstall the whole add-in. Is there any way to do it or has anyone here done it?

       

      I have manged to add them to existing menu but not to existing command bar tab.

       

      I am using Solidworks 2013, SP 0.0 and Visual Studio 2015 to write my codes in C#.

       

      Regads,

      Nilesh Patel

        • Re: How to add add-in button to existing command bar tab?
          Alexander Klammer

          Add an Add-In Button to existing command bar tab:

          I´m not quite sure if this is possible.

           

          Each button on different command bar tab:

          You create a "commandgroup" to which you add "commanditems" - so you can add as many buttons to the same command bar tab as possible.

           

          You can add/remove this commandtab with "addcommmandtab/removecommandtab" and add the buttons with "addcommandtabbox - addcommands".

           

          Do you use the Solidworks SDK Template? - You can find an example there?

           

          I´m not sure if i understood what you mean. - Can you offer some more Information/Example? (Screenshot or Code?)

           

           

          BR

          Alex

            • Re: How to add add-in button to existing command bar tab?
              Nilesh Patel

              Hi Alex,

               

              Sorry for the delayed response.

               

              MyAddin.JPG

               

              As you can see in the attached image, I have created an addin which adds a command bar tab "My Addin" which has 2 buttons. Originally, I wanted to create one addin with one button and then create another addin which adds second button to the first addin command bar tab (in this case, it would be "My Addin" tab). It may not be possible but I would like to know if someone has tried anything like this. Hope this make sense to you.

               

              I am using SolidWorks SDK template. I fully understand how to create command group and add buttons to the command bar.

               

              Regards,

              Nilesh Patel