.NET

Reply
Valued Contributor
FRPT1257
Posts: 69
Registered: ‎05-03-2006
Message 1 of 2 (119 Views)
Accepted Solution

Autodesk.AutoCAD.Interop missing

119 Views, 1 Replies
07-23-2014 12:01 PM

I added the following references:

"AutoCAD 2015 Type Library"

"AutoCAD/ObjectDBX Common 20.0 Type Library"

 

But when I add the line:

 

using Autodesk.AutoCAD.Interop;

 

 

Interop is not available. What could I be missing?

 

Thanks & Regards

 

To user AutoCAD COM API, you have 2 ways to set references to the COM libaries:

 

1. You can set references to the COM managed wrappers coming with ObjectARX SDK (primary interop assemlies provided by veders - Autodesk). With this interop assemblies, Autodesk defines the namespace Autodesk.AutoCAD.Interop, and Autodesk.AutoCAD.Interop.Common.

 

Prior to AutoCAD2013, AutoCAD installs the PIA into the GAC and updates Windows registry, so that the interop assembly references appear in VS's reference dialog's COM list.

 

2. However, since AutoCAD 2013, AutoCAD does not install the PIA into GAC any more. If you set reference in VS reference dialog->COM tab-> Acad typelibrary/Common type library, VS will use COM type library importing tool to create the managed interop assemblies for you, thus the namespace will be different. I guess this is what you did. If you look into the Object Browser, you would see that the name space is "AutoCAD" and "AXDBLib".

*Expert Elite*
norman.yuan
Posts: 998
Registered: ‎04-27-2009
Message 2 of 2 (107 Views)

Re: Autodesk.AutoCAD.Interop missing

07-23-2014 12:38 PM in reply to: FRPT1257

To user AutoCAD COM API, you have 2 ways to set references to the COM libaries:

 

1. You can set references to the COM managed wrappers coming with ObjectARX SDK (primary interop assemlies provided by veders - Autodesk). With this interop assemblies, Autodesk defines the namespace Autodesk.AutoCAD.Interop, and Autodesk.AutoCAD.Interop.Common.

 

Prior to AutoCAD2013, AutoCAD installs the PIA into the GAC and updates Windows registry, so that the interop assembly references appear in VS's reference dialog's COM list.

 

2. However, since AutoCAD 2013, AutoCAD does not install the PIA into GAC any more. If you set reference in VS reference dialog->COM tab-> Acad typelibrary/Common type library, VS will use COM type library importing tool to create the managed interop assemblies for you, thus the namespace will be different. I guess this is what you did. If you look into the Object Browser, you would see that the name space is "AutoCAD" and "AXDBLib".

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.