Instructions provided describe how to create AutoCAD BLOCKS with attributes from ArcGIS point features using the ArcInfo Export to CAD tool.
To create AutoCAD drawings with BLOCK entities using the Export to CAD tool, it is necessary to supply a valid AutoCAD seed file that contains the block definitions of the block INSERT entities being referenced. These BLOCK entities, commonly referred to as AutoCAD BLOCKS, are referenced by name. They may be defined with simple or complex geometry and may include named text variables called ATTDEF sub-entities. These named ATTDEF sub-entities provide the means for the AutoCAD INSERT entities to hold an attribute value.
When the Export to CADD tool encounters input feature classes with specially named CAD fields, it uses the valid values in those fields to determine how a CAD object is created.
To create AutoCAD block INSERT entities with attributes, perform the steps below. Most of the work is done to prepare the data prior to executing the Export to CAD tool.
- Locate or create a valid AutoCAD seed file containing the block definitions that are going to be created with the Export to CAD tool.
Consult the AutoCAD documentation on the creation of block definitions with and without attributes, and the creation and use of seed files.
- Modify the input point feature classes' attribute table to include a field called CADType. The default entity type created by the Export to CAD tool for an ArcGIS point is an AutoCAD POINT entity. To override the default behavior of the Export to CAD tool, a valid entity type value other than POINT can be specified in a field called CADType.
Use the ADD FIELD tool to add the CADType field to the feature class. The CADType is a string value with a width large enough to contain the length of any of the AutoCAD entity types that are used.
- Populate the CADType field with the string value INSERT to specify the creation of an INSERT type entity. A value of INSERT in the CADType field triggers the Export to CAD tool to generate INSERT entities rather than the default POINT entity in the output AutoCAD drawing.
- Modify the input feature classes' attribute table to also include a field called RefName. The RefName is used by the Export to CAD tool to specify which named block INSERT entity should be used to represent the ArcGIS point.
Use the ADD FIELD tool to add the RefName field to the feature class. The RefName is a string value with a width large enough to contain the length of any of the block names used.
- Populate the RefName with the string value of the desired AutoCAD block name.
All features in a feature class can reference the same block name or each a different BLOCK name.
This triggers Export to CAD to search the SEED drawing supplied in step 1 for the BLOCK definition, and creates an instance of the BLOCK for each feature with a matching name.
If no matching BLOCK definition is found in the seed file or the appended file, a simple BLOCK with a unit circle is created instead.
- Modify the input point feature class feature attribute table to include a field named to match the tag names of ATTDEF entities included in the BLOCK definition.
When Export to CAD finds a matching BLOCK in the seed file or a drawing being appended to, it further searches for matches between the ATTDEF tag names and the input feature attributes. If it finds a matching tag name and field name, it includes the value of that field as an attribute of the insert entity, thus populating the drawing BLOCK's attributes with feature class attribute values.
Use the ADD FIELD tool to add fields to the feature class that match the AutoCAD ATTDEF tag names. These fields can be of any type, but are converted to strings since AutoCAD BLOCK attributes only support strings. It may be useful to rename or alias existing fields in the feature attribute table to match the ATTDEF tag names of the BLOCK definitions.
Use the ADD FIELD to create a new field. Use the FIELD INFO parameter of the MAKE FEATURE LAYER tool to rename a field. Use the CALCULATE tool to populate any field with a value.
- Run the Export to CAD tool and supply the input feature class(es) with the appropriately modified feature attributes.
Also, supply a valid AutoCAD seed file to provide the needed block definitions for the AutoCAD BLOCKS being specified by values contained in the RefName field of the input features.