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:



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

3 reacties:

Anonymous said...

Thank you, very helpful.

Anonymous said...

I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.



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.