The Mysteries of AutoCAD Object Data: Part 2
My wife’s piano students had their Christmas recital this past weekend, and they were all splendid. Briana played Beethoven’s Fur Elise, but that is not my story at all. My daughter’s basketball team at her tiny school is gearing up for the basketball season and after the initial recruiting effort here is how it stacks up. Remembering this is a ninth grade team, we have three ninth graders, four eight graders, five seventh graders and one eleventh grader?!
…The problem is the eleventh grader, Elise. She is six foot tall and played point guard last year on the varsity team. The rest of last year’s varsity team were all 12th graders and they are gone. Remembering this school is tiny, Elise is the lone basketball player older than ninth grade. The solution… form two teams; a ninth grade team where most of the girls are already too young to play, and another team with the same girls and Elise to play varsity! I am just the assistant coach and I guess I must share in the blame for not saying no, but I guess it’s Für Elise!
Sometimes you work with what you’ve got, and object data is the right thing to use when attributing objects in the Autodesk infrastructure ad-on products to AutoCAD, I don’t have a choice. Problems only arises when I need to move the data into GIS. The first and most logical path for moving data with its attributes is to simply use the Map 3D function to convert the data to an ESRI Shapefile. You’re done... happy day.
…Ahhh, then there is the unfortunate fact that the double precision 3D ESRI Shapefile doesn’t support curves. The 3D double precision ESRI personal geodatabase does support curves and splines. For Autodesk Map users there is a new FDO plug-in for ESRI personal geodatabases. I am a strong proponent of the benefits of editing GIS data with a GIS application, with this Autodesk Map FDO provider, you can directly view features from an ESRI personal geodatabase using your existing seat of Autodesk Map, I have no idea if it works and not everything in the personal geodatabase is supported, but it sounds pretty cool.
Another method to retain both the attributes and curvilinear data not supported by a 3D ESRI Shapefile is to export the object data attributes and link them back up in the to the CAD entities in ArcGIS. I need to export the object data into some industry standard data format such as .dbf file or a text file or some other standard database-like format. I will want to ensure that included with a dump of the proprietary object data attributes that there is some key field upon which I can re-link the data once I am in a GIS. I will be able to perform a table join directly on the CAD data without converting the data or after I convert it if needed.
Another trick to get object data with curvilinear geometry is to create a Shapefile and only use the attribute table part. With ArcGIS, read the AutoCAD file directly, the AutoCAD entity handles will still be in the original drawing. Make sure the entity handle property is included in the output Shapefile’s attribute table. I can then ignore the geometry part of the Shapefile and link the AutoCAD file with the curvilinear data directly within ArcGIS to the .dbf part of the matching Shapefile’s attribute table. (This only works when I am working with Object Data on real AutoCAD entities rather than custom entities. …More about custom AutoCAD geometry later)
I can create my own AutoCAD applications that utilize Object Data. It may be necessary to utilize the AutoCAD API tools of AutoLISP, Visual LISP, VBA/VB, or VB .net to output a database file according to my controlling application’s logic using a customized script. I would then re-join to the CAD features from within ArcGIS to my output table of attributes using the AutoCAD entity handle as a key field.