I have a VB winform project where I am reading data from a table inside a DWG file. By this method AutoCad needs to be open( making the application slower ).
I found the article show below where you can use a different approach where you use a Database object( represent our in-memory drawing ) But I don't know what DLL do I need to reference to be able to use this method. The method use on this appraoch is :
using Autodesk.AutoCAD.DatabaseServices; --> need to be able to import
And also the article is from 2006 and on C#. Is there a Better approach now a days ?
Thanks in advance
Breaking it down-A closernLook at the C# code for importing blocks
If you create a .DLL that you load inside AutoCAD (with NETLOAD command or with PackageContents.xml/.bundle folder), then you need the following references from AutoCAD install folder:
And make sure all the references are set as Copy Local = false, note this is important :-)
You may have problems with .NET version, so make sure that you have:
And if you choose a older version of .NET, the compiler may throw erros, like cannot use the references. If you are starting, please check at http://www.autodesk.com/myfirstautocadplugin
Now, if you have a external application (.exe), then you cannot use the above, but only the COM references (also from AutoCAD install folder)
But for these COM interop you have a different data-model and also a different namespace. Also, this is deprecated, meaning no new features to it.
You can get the DLLS from ObjectArx Libraries which are here . When you install them there will be the dlls you need.
Look at AutoCAD`s Developers Guide examples and explanations for the latest "How to".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.