December 06, 2006

The Mysteries of AutoCAD Object Data: Part 1

I just had a conversation with my mother in law regarding ideas for gifts for my 13 year old daughter. She called to get some suggestions from me. I asked her if she had seen the Christmas list my daughter had compiled that was posted on our refrigerator at home. Her comment was, "Yes … (then a pause)… I read it, but I didn’t know what any of the words meant. "

Sample entries: … a Bluetooth Earbud, Aurvana Headset, Zen Microphoto MP3 silicon Skin, Manheim Steamroller CD…

My daughter lives in an era once removed from her grandmother. The world has been rewired (or rather unwired) since the gift buying days for her once teenage daughter (my wife). Even though my mother-in-law could read the list it doesn’t make any sense to her without help from the "controlling application" in this case, my wife and I, her granddaughter’s parents.

Initially the mechanical drawing pencil of AutoCAD was developed without the concept of user defined attributes. With the later introduction of the AutoCAD block attribute, text tags could be added to a point symbol to hold user defined attributes. I use AutoCAD block attributes to store descriptive information about points in AutoCAD as if they were GIS point features. These block attributes have a tag name that can be utilized like a field name. Multiple block attributes can be associated with a single block/point symbol to mimic a database record. The block attributes is limited in field type to ASCII text. ArcGIS supports these block symbols and attributes as fields in the CAD virtual attribute table and attempts to apply a field type to numbers or integers if the values are consistent throughout the drawing. Block attributes although easy to create, edit and read are only valid for point symbols (block inserts). There is no way to create similar attributes for AutoCAD lines or polygons.

The modern method of attribute data storage for AutoCAD entities is to use AutoCAD Object Data or external database links. For example the AutoCAD ad-on customization code that extends AutoCAD for mapping, Autodesk Map 3D uses this technique. Standard AutoCAD entities can be tagged with x-records that are stored in a section of the AutoCAD drawing called the data dictionary. Also stored in the AutoCAD data dictionary are things like M-Line Styles, Line Types and Groups. Both the schema (the fields names and data types), as well as the attribute values themselves are stored in the AutoCAD dictionary data constructs.
Industry standard interoperability tools have the ability to access and read the AutoCAD data dictionary like all other parts of the AutoCAD DWG/DXF file. However, the x-record values for object data style attributes are stored as binary chunks of information simplified for storage according to the encodings used by the controlling application. This means that although I as an AutoCAD user could use AutoLisp to read the value of x-records from the dictionary, what I see is just a proprietary blob of binary data. The information in the binary chunk could be analyzed, but because the meaning of the binary data is held by the controlling application it is like removing all the vowels, punctuation and spaces from a paragraph and then converting all the letters to numbers. Without any context whatsoever, the data is unusable. All that to say ArcGIS 9.2 still does not support AutoCAD Object Data.

Here is one resource that discusses the creation of GIS friendly CAD data for mapping.


Post a Comment

<< Home

FREE hit counter and Internet traffic statistics from