AnsweredAssumed Answered

Two AddIn Registry Questions

Question asked by Brant Williams on Mar 1, 2014
Latest reply on Mar 4, 2014 by Brant Williams

Question 1: If you are removing an AddIn, what Registry entries should be deleted?

 

The two primary entries made during Com Registration are:

HKLM SOFTWARE\\SolidWorks\\Addins\\{" + t.GUID.ToString() + "}

HKCU Software\\SolidWorks\\AddInsStartup\\{" + t.GUID.ToString() + "}

 

But if you do a search on the GUID in the registry...you will find there are entries all over the place...most of them under the User Interface Sub Sections...  Do you try and chase down ALL the entries...or do you just let them sit there.

 

Question 2: This question relates to the standard SwAddIn Template provided by the API SDK. When Solidworks starts, and your AddIn is set to load, SW creates an instance of the SwAddin object. In the base template, the SwAddin Class has some constants declared including mainItemID1 and mainItemID2.  These same constants are passed as a parameter to the AddCommandItem2 calls which set up 2 example command group items in the template.  When these command group items are added, is that when SW saves the IDs to the Registry?

 

If you also examine the code in the AddCommandmgr() method, you will see that it compares the current IDs (the constants declared in the SwAddin Class...which will be passed to the AddCommandItem2 calls ) to IDs stored in the registry from previous sessions.  I have played around and confirmed that these IDs ARE the constants declared at the SwAddin class.  What is the point in all this?

 

Thanks.  I am just trying to understand how this works.  There are a lot of things that seem to go on in the back ground that the SWorks Application instance does...than you can not really see. 


Outcomes