.NET

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

Autodesk.AutoCAD.Interop missing

122 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: 1,001
Registered: ‎04-27-2009
Message 2 of 2 (110 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".

Need installation help?

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