Block Party: Points
Last week included the 4th of July holiday, and we and the neighbors on our street had a traditional block party. We barricaded the streets and set up tables and volleyball. We set up several barbeques in the driveways and had a great time.
In honor of the good’ol American block party the first posting on attributing CAD drawings will be several suggested methods of using the AutoCAD
block insert entity. Block insert entities have the ability to hold named textual attributes. Blocks with attributes can retain the ArcGIS feature attributes when data is exported to an AutoCAD file using the ArcInfo Export to CAD geoprocessing tool.
A little background information about the AutoCAD block entity is probably warranted for the GIS-centric readers. A “block” is defined as a specified collection of other AutoCAD entities. Once defined and saved instances of the block can be placed as a single entity. Blocks can be simple or entire drawings. Blocks definitions can contain special entities call attribute definitions, or
AttDef entities. These entities have logical names called tags. When an instance of a block containing one or more
AttDef entities is placed as a
block insert entity the
AttDef magically turns into a
block attribute sub-entity, and can hold a text value. This textual
block attribute can be visible or invisible. It looks and is formatted in the same way as a text entity. The major differences between the
block attribute and
text is that once placed it is tied to the insert entity and has a logical name (
tag name).
Blocks themselves have a logical name or
RefName, also called the
block name.
Block names are unique in any given drawing. The geometry of a
block insert entity is an insert point. Although a block may be defined with complex geometry the
block insert entity is essentially a point.
In terms of GIS and CAD interoperability, a GIS point feature maps very well to a CAD block insert entity with attributes.
To ensure that the ArcInfo Export to CAD tool creates block insert entities from your exported GIS point features you must override the default behavior of the tool, which will create AutoCAD point entities from the GIS point features. This is accomplished by adding a specially named column to your GIS feature class called ‘CADType’ and calculating its string value to be the keyword “Insert”. This effectively tells the Export To CAD tool to create Insert entities rather than the default Point entities.
You will also need to supply an AutoCAD seed file as input to the Export to CAD tool that contains all of the block definitions you will be referencing. This seed file needs to contain the block definitions, and you will need to ensure that the AttDef tag names in the those block definition match the column names of the exported GIS point features. If you already have blocks defined with different tag names you can always rename the GIS column names to match and get the desired affect.
If you are a GIS user this may seem a little compliated, but to an AutoCAD user, they should be tracking right along, so just print out the above paragraph and they can easily create a seed file with the correct block definitions for you. You need a block defined such that the AttDef tag names match your GIS feature attribute column names.
The next step to ensure the proper creation of AutoCAD block insert entities with attributes from the Export to CAD tool is to include a specially named column called ‘RefName’ in the GIS features you are exporting to AutoCAD. You then need to populate that field with the name of the AutoCAD block that you would like to use to represent the GIS point in AutoCAD. When the points are exported, the GIS point’s coordinates will be used as the insertion point of the AutoCAD block insert entity and any matching tag names will be populated with the appropriate values. Any numeric fields will automatically be converted to appear as text values in the cooresponding AutoCAD block attributes.
This works great for points... what about linear features and polygons?
(Stay tuned for more in the series…)