A Reference to 'Autodesk Inventor Object Library' Could not be added Inv 2013

A Reference to 'Autodesk Inventor Object Library' Could not be added Inv 2013

Anonymous
Not applicable
1,306 Views
3 Replies
Message 1 of 4

A Reference to 'Autodesk Inventor Object Library' Could not be added Inv 2013

Anonymous
Not applicable

I just updated Inventor 2013 from Sp2 Update 3 to Sp2 Update 6. Now, I can no longer add a reference to the Inventor Object Library in Visual Studio Premium 2013. Any suggestions?

0 Likes
Accepted solutions (1)
1,307 Views
3 Replies
Replies (3)
Message 2 of 4

rjay75
Collaborator
Collaborator
Accepted solution

Is this for a addin or standalone application?

 

What Reference are you using. The reference you want to use is Autodesk.Inventor.Interop.dll.  I can't remember the directory in 2013 but in 2014 and up its in the Inventor installation directory bin\Public Assemblies.

0 Likes
Message 3 of 4

Anonymous
Not applicable

It's a standalone application.  Interestingly enough, Visual Studio won’t let me make the reference to the COM object, but I can reference the Autodesk.Inventor.Interop.dll file. That’s odd. However, it works.

 

Thanks for your help.

0 Likes
Message 4 of 4

rjay75
Collaborator
Collaborator

Some COM libraries will work with Visual Studio but the recommended way of adding references for COM objects is through an Interop if available. Otherwise Visual Studio will attempt to make an interop dll on the fly through reflection on the COM library. And for Inventor the supplied assembly is recommended since it's built to more accurately represent the API as intended.

0 Likes