By Adam Nagy
If you have issues with loading or reloading your add-in these might be the most likely issues.
1) Issues with loading the add-in
This is the scenario when your add-in never gets loaded.
Is your add-in found by Inventor?
- if your add-in is not listed in the Add-In Manager dialog then Inventor cannot even find your add-in. You should check that you placed your *.addin file in the right folder and that all the information in it is correct: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=20143212
Does your add-in have a unique id?
- maybe your add-in was based on an existing add-in and so is using the same GUID as another one which gets loaded into Inventor. You can always list all the add-in GUIDs which are being loaded into Inventor and compare that to your add-in's GUID.
Is the bitness of your add-in the same as Inventor's?
- check the project setting that it's 32 bit on a 32 bit OS and 64 bit on a 64 bit OS. In case of a .NET add-in the easiest is to use the "Any CPU" setting
Is your add-in COM Visible?
- make sure that "Make assembly COM-Visible" setting is checked. Note: do not confuse it with the "Register for COM interop" setting which should be switched off as that would make the add-in use the old registration mechanism.
Still cannot load it?
- if you still cannot even step into the code inside the Activate() method then you might have some unresolved dependencies or you might have some issues inside the constructor of your ApplicationAddInServer implementation or maybe some global variables that error out. If there are any issues before reaching the Activate() method or inside that, your add-in will not get loaded.
2) Issues with reloading add-in
This is the scenario when you could already load your add-in successfully, but within the same Inventor session, once you unloaded your add-in you could not get it loaded again.
Are you removing the controls you are creating?
- the most likely problem is that you are creating some control definitions and UI components, but you do not remove them inside the Deactivate() method when your add-in gets unloaded. So when you try to load your add-in again, since those components already exist, your code will error out and the loading of the add-in will be cancelled.