.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interop - COM or .NET

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1690 Views, 5 Replies

Interop - COM or .NET

Using 2011 objectarx with vs 2008 I noticed there are two ways to use interop.

1. Reference the COM libraries (AutoCAD 2011 and ObjectDBX 18)

2. Reference the .NET libraries (Autodesk.AutoCAD.Interop 18.1 and Autodesk.AutoCAD.Interop.Common 18.1)

 

Which is correct or preferred?

5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

They're essentially the same. When you add a reference to a COM type library

in Visual Studio, it imports the type library and generates the 'TypeLibrary.Interop.dll'

assembly for you, in your project.

 

The '*.interop.dll' files it generates contain the managed wrappers for the COM

type library.

 

The only advantage of referencing the pre-built interop libraries directly is that

you can set CopyLocal to false, and eliminate the need for Visual Studio to

generate the wrappers for you, and not have them replicated in every project

where you use them.

Message 3 of 6
Anonymous
in reply to: Anonymous

have the autocad .net assemblies been added into the GAC on new version? Previously i've always had to browse to the dll in the program files folder when addding a reference....

Message 4 of 6
Anonymous
in reply to: Anonymous

AFAIK, they've always been in the GAC, and have been on the

COM tab of the Add Reference dialog.

Message 5 of 6
Anonymous
in reply to: Anonymous

I might be using the wrong terminology. Right now i'm developing for autocad 2010 using VS2008 express edition. On my 32-bit machine i can find both "AutoCAD 2010 Type Library" and "AutoCAD/ObjectDBX Common 18.0 Type Library" in the Add Reference....COM tab. On the 64-bit machine "AutoCAD 2010 Type Library" appears on the Add Reference....COM tab but i have to browse to "C:\Program Files\Common Files\Autodesk Shared\axdb18enu.tlb" to get ObjectDBX. Neither the 32-bit or 64-bit machines show any Autodesk.AutoCAD.Something assemblies in the Add Reference.....NET tab. Is this ithe case for everyone or are my installs just mucked up somehow?

 

-Chris

Message 6 of 6
Anonymous
in reply to: Anonymous

Here (64 bit Vista) I see this on the COM tab:

 

"AutoCAD/ObjectDBX Common 18.0 Type Library"

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost