English

How To: Create AutoCAD block inserts with attributes from ArcGIS point features

Summary

Instructions provided describe how to create AutoCAD block INSERTS with attributes from ArcGIS point features using the ArcInfo EXPORT TO CAD tool.

Procedure

To create AutoCAD drawings with block INSERT 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 INSERT 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 CAD 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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 blocks inserts 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.
  7. 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.

Related Information