AnsweredAssumed Answered

How to unregister custom command tab

Question asked by Jared Ticotin on Nov 28, 2020

I finally figured out how to use solidworks add-ins to create custom tabs with buttons in the command manager (took me way too long!). The only thing I'd like to learn how to do now is remove this tab from registry from within my code. If I make any updates to my addin, I want to make sure everyone else on the team gets those updates. I found that certain changes don't get implemented (such as changing from a toolbarid to commandid) unless I manually delete the tab from registry.

 

I tried adding this to my DisconnectFromSW() method:

this.tab.RemoveCommandTabBox(this.tabbox);
this.commandmgr.RemoveCommandTab((CommandTab)this.tab);
this.commandmgr.RemoveCommandGroup(1);

Neither of these commands removes the tab from registry. Is there something I could add to DisconnectFromSW() method to automatically remove the custom tab from registry to force it to be recreated when ConnectToSW() is called?

Outcomes