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

VB.NET ObjectData record information

1 REPLY 1
Reply
Message 1 of 2
Anonymous
602 Views, 1 Reply

VB.NET ObjectData record information

Anonymous
Not applicable

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.

0 Likes

VB.NET ObjectData record information

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.

1 REPLY 1
Message 2 of 2
norman.yuan
in reply to: Anonymous

norman.yuan
Mentor
Mentor

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.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

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.

 

Norman Yuan

Drive CAD With Code

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report