Migrating AutoCAD COM API applications to AutoCAD 2010

1. Change your CreateObject and GetObject calls from “AutoCAD.Application.17” to “AutoCAD.Application.18”

2. Change the reference “AutoCAD” from “AutoCAD 2009 Type Library” to “AutoCAD 2010 Type Library” (Autodesk.AutoCAD.Interop)

3. Change the reference “AXDBLib” from “AutoCAD/ObjectDBX Common 17.0 Type Library” to “AutoCAD/ObjectDBX Common 18.0 Type Library” (Autodesk.AutoCAD.Interop.Common)

See also:

http://autocad.autodesk.com/?nd=autocad_tips_tutorials_detail&adsk_tip_id=676&jid=2036

 

You will probably have to make some extra changes when reading/saving .dwg’s but I have yet to check those problems.

Posted by Bert Vanpeteghem

2 reacties:

Anonymous said...

Thank you, very helpful.

Mark said...

For my Object enablers which are in native C++ I set an Environment variable ACADSDK to the appropriate directory
and e.g. set
C/C++ -> Additional Include Directories = $(ACADSDK)\inc
Linker -> Additional Library Directories = $(ACADSDK)\lib
So I can move my projects anywhere and also easily switch versions.

Unfortunately I am not aware of a way doing this for C# or VB.NET.

BTW: I somewhere read that it is import to reference the dlls from the SDK and not the ACAD installation directory. The SDK-dlls supposedly have some references removed which may lead to problems.
For these references also "Copy Local" should be set to false.