Which Interop should I use?

Which Interop should I use?

matt_jlt
Collaborator Collaborator
399 Views
3 Replies
Message 1 of 4

Which Interop should I use?

matt_jlt
Collaborator
Collaborator

There are two different locations for the inventor interop dll files.

 

GAC

and

\Program Files\Autodesk\Inventor 20xx\Bin\Public Assemblies

 

Which location should I be using for registry free addins? Also if I want multi-version support, what version should I target?

 

Thanks, Matt.

0 Likes
400 Views
3 Replies
Replies (3)
Message 2 of 4

rjay75
Collaborator
Collaborator
0 Likes
Message 3 of 4

ekinsb
Alumni
Alumni

The previous reply is correct in that you should select the one in "\Program Files\Autodesk\Inventor 20xx\Bin\Public Assemblies" when adding a reference.  However, once you've done this Visual Studio and the .Net framework actually ends up referending the assembly in the GAC.  Microsoft has changed some things in how they implement the GAC and I haven't kept up if there have been changes in their recommendations, but previously you weren't supposed to directly add references to the GAC, but only indirectly.

 

Regarding your question about which interop to reference if you want compatibility accross multiple versions, you should reference the interop from the oldest version that you want to be compatible with.

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 4 of 4

smilinger
Advisor
Advisor

Any update on this? Because I am using the addin template for inventor 2016 and I find the template is now referencing the dll in the GAC instead of the one in Program Files folders.

 

So should I reference the dll in GAC now?

0 Likes