0

I have Autodesk Inventor 2012 and its SDK, including add-in creation wizards, installed. I have created an add-in project (in VB.NET), and used the code from SimpleAddIn sample provided. .addin file points to the location of dll output of the compilation.

However, i have run into a following problem. When Inventor loads, not a single breakpoint in the add-in Activate function is triggered. Moreover, when i call the list of add-ins, mine is shown in the list as not loaded, and however i flag it to be, it does not.

What could be the reason for this behaviour? How can that be fixed?

Srv19
  • 3,458
  • 6
  • 44
  • 75
  • I'm voting to close this question as off-topic because i can no longer test provided answers and accept them – Srv19 Sep 09 '15 at 13:17

3 Answers3

2

Well, I assume that you're using RegistryFreeAddins being deployed via Manifests... From the fact that your AddIn is listed in the AddIn Manager, I conclude that the registration works, but the loading at runtime fails. This can have those main reasons:

  • Missing Dependencies (in case you use third party assembiles)
  • BadImageFormatException (your AddIn compiled in x86 and you have X64 Inventor installed, which you always have in case you've got a 64-bit OS)

Have a look at your debug output in VisualStudio. Do you see any Exception Messages, that would relate to your AddIn? If not, you could try to activate the "Managed Debugging Assistants" in VS (especially for BadImageFormat- and FileNotFoundException(s)). Just google the above phrase to see how it's done.

Hope I could help :)

mw_21
  • 150
  • 5
1

Are you targeting .Net 4? Inventor 2012 supports only .net 3.5 it seems. I ran into the same problem and changing to 3.5 made my plugin load correctly.

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Registry-free-addin-won-t-load/td-p/3488178

Johan Larsson
  • 17,112
  • 9
  • 74
  • 88
  • Yes, my plug-in is .net 4. I will try what you proposed. – Srv19 Sep 20 '12 at 07:46
  • That is not entirely true, I have add-ins that are .net 4.5 that run in all versions of Inventor from 2011 up. But there definitely are some hurdles to overcome to get it running. – Fütemire Sep 30 '15 at 04:21
0

if for a reason or another, the library load crash in the Activate procedure, you will not be able to debug the solution.

So, clean the Activate sub and keep only necessary calls and try again.

If it's still not working, just PM me the Activate procedure and I'll help you.

J-SHould
  • 56
  • 6