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

External programming: VB.NET; DWG reading DLL

1 REPLY 1
Reply
Message 1 of 2
BrianWren
459 Views, 1 Reply

External programming: VB.NET; DWG reading DLL

I had posted this at http://discussion.autodesk.com/thread.jspa?messageID=5419683늣, and it was suggested in a reply to post it here...

I need to read an existing .dwg, get the block refs in it, and (for a specific block name) grab the attributes to import into an Oracle DB.

I was unable to figure out a way to open AutoCAD from within VB.NET 2005, use the reference thus obtained to open a drawing in that instance of AutoCAD, and then work with the drawing’s block references.

What are the appropriate References to add to my VB project, and what are the names of the type for the Acad application and the drawing?
What is the proper method to open AutoCAD?
What is the proper method to load a drawing and obtain a reference to it?


Alternately, I don’t really need to open AutoCAD if I can just process the .dwg.
Is there a DLL or other library that will allow me to extract info from a AutoCAD .dwg?
If so, the above questions still apply: How do I communicate with this library to accomplish the goals stated above?

Thanks.
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: BrianWren

You use ActiveX automation to get an AutoCAD application object instance.
Automating AutoCAD is quite similar to automation MS Word/Excel, if you
happen to know that. You need to study AutoCAD object model to know how to
manipulate AutoCAD/drawing's objects.

You need to set reference to AutoCAD type library (unless you use late
binding).

You need to start AutoCAD, then open the drawing in AutoCAD, in order to
read drawing information. That means, AutoCAD installation and running
session of AutoCAD are required, unless you lisnece very expensive RealDwg
from Autodesk.

If also need to pay attention to AutoCAD version compatibility if your app
runs against different versions of AutoCAD.

wrote in message news:5419684@discussion.autodesk.com...
I had posted this at
http://discussion.autodesk.com/thread.jspa?messageID=5419683늣, and
it was suggested in a reply to post it here...

I need to read an existing .dwg, get the block refs in it, and (for a
specific block name) grab the attributes to import into an Oracle DB.

I was unable to figure out a way to open AutoCAD from within VB.NET 2005,
use the reference thus obtained to open a drawing in that instance of
AutoCAD, and then work with the drawing's block references.

What are the appropriate References to add to my VB project, and what are
the names of the type for the Acad application and the drawing?
What is the proper method to open AutoCAD?
What is the proper method to load a drawing and obtain a reference to it?


Alternately, I don't really need to open AutoCAD if I can just process the
.dwg.
Is there a DLL or other library that will allow me to extract info from a
AutoCAD .dwg?
If so, the above questions still apply: How do I communicate with this
library to accomplish the goals stated above?

Thanks.

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