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.
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.
Access a broad range of knowledge to help get the most out of your products and services.