.NET

Reply
Active Contributor
chase.hochstrasser
Posts: 42
Registered: ‎07-17-2013
Message 1 of 2 (210 Views)

VB.NET ObjectData record information

210 Views, 1 Replies
12-12-2013 01:56 PM

What is the fastest way to open a drawing and get ObjectData Records?

 

I have been trying readdwgfile, Add, and Open. Open works but I have a lot of files run through, which seems like it would take about 3 days to open and extract each drawing. maybe if i can run a piece of code outside of AutoCAD 3D map it would be fast but i need to read the ODRecords in each drawing.

*Expert Elite*
norman.yuan
Posts: 1,063
Registered: ‎04-27-2009
Message 2 of 2 (171 Views)

Re: VB.NET ObjectData record information

12-13-2013 07:05 AM in reply to: chase.hochstrasser

Firstly, your question is AutoCAD MAP 3D specific (e.g. using MapManagedApi.dll, which vanilla AutoCAD .NET API programmers have no idea what it is), you may want to post to AutoCAD Map 3D developement forum, instead.

 

Yes, in order to reach AutoCAD Map specific data in drawing, such as ObjectData, the drawing has to be open in AutoCAD Map. So, yes, if you have a lot of drawings to process, you need to open them one by one, it makes things a quite slow.

 

Using a side database with ReadDwgFile() does not work, if memory serves me correctly.

 

Another way that can make it a lot faster is to start a master drawing and create a drawing set in this drawing (this is an AutoCAD Map specific operation). Place all your target drawings in ths drawing set. This way, for the ProjectModel object of the master drawing, all ODTables of all drawiings in the drawing set is visible, and you can build map query to retrieve the ObjectData in many drawings in one shot. For example, you can start manually build a drawing set in a drawing, and manually query the entities in all drawings in the drawing set based on targeting ObjectData, and bring all the result entities into current drawing. The entities brought in by the query will come with their original ObjectData still attached. Then you can run your existing code only against one drawing.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.