December 08, 2006

The Mysteries of AutoCAD Object Data: Part 2

Für Elise

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.
Please read the comments from Dale Lutz below (click the comments link).


Anonymous Anonymous said...

Hi Don,

I just double checked and the open source Personal Geodatabase driver does not allow writing (and I'm not surprised, reading is always a bit easier because you can ignore the stuff you don't care about).

There is an
which we've developed that is part of FME and allows direct reading of any geodatabase via FDO, but not writing. However, because we
extend Map 3D
and thereby add other export formats, including Geodatabase of any kind, it is possible to do an export out of Map3D into geodatabase and completely preserve any arcs you had.

As an aside, the new MapGuide SDF3 format has alot of nice properties for Map3D and external interchange over Object data. SDF3 is fully support as read/write in Map3D, it supports attributes and complex geometries, and it is more easily support for interoperability than object data because libraries exist for it (and FME fully supports it fore both reading and writing).

Dale Lutz
Safe Software Inc.

4:29 PM  
Blogger Don Kuehne said...

Just in case the reader missed it; Dale's middle name is Interoperability-ytilibareporetnI (read/write). A very welcome comment from someone in the know.

Thanks Dale.

8:52 AM  
Anonymous Anonymous said...

I just bumped into your blog... Hey, what a nice job!
I realized that I have a lot to catch up... where do I start?

7:57 PM  
Anonymous Anonymous said...

I just bumped into your blog... Hey, what a nice job!
I realized that I have a lot to catch up... where do I start?

7:57 PM  
Blogger Don Kuehne said...


Thanks for the comment. Look over on the side bar to the right. I have a link to a page that indexes all my entires there.

9:35 PM  
Anonymous Sierk said...


Fun (AutoCAD) blog. Here is some brain food for you since you are seemingly interested in dissecting the AutoCAD Map inners. We spend a lot of time batch creating AutoCAD features with object or attribute data, using MS Access to create scripts that re-draw features. This of course works great with the notable exception of probably losing some minute accuracy over time, and having to deal with building script files in the first place.

I stumbled upon your blog when I searched for a possible way to join Object Data to an external table using a common ID and then be able to Batch update the Object Data table. Looks like we aren't quite there yet. I guess I should go back to creating scripts.

BTW, If you like Fur Elise, Google Moby and Fur Elise. His keyboard player does a fun rendition on yahoo music (videos)

9:54 AM  

Post a Comment

<< Home

FREE hit counter and Internet traffic statistics from