Exporting features to specific CAD layers

This workflow demonstrates how to export features to a specific CAD layer and layer color using reserved CAD fields Layer and LyrColor.

Add reserved CAD fields to the attribute table

Adding the Layer field

The Layer field specifies the CAD layer that is created for each feature entity. Use Field Calculator to specify the target layer name. You can specify the same layer for all features or direct features to specific layers.

Steps:
  1. Right-click the feature layer in the table of contents and click Open Attribute Table.
  2. Click the General Tabular Operations button Table Options on the attribute table menu bar and click Add Field to open the dialog box.
  3. Type the field name Layer in the Name text box.
  4. Click the Type arrow and click Text to assign the data type.
  5. Accept the default field length of 50.
  6. Click OK to close the dialog box and create the field.
  7. Right-click the Layer field name in the attribute table and click Field Calculator Calculator on the shortcut menu.
  8. Type "MyLayer" (including the double quotes) in the Expression text box.
  9. Click OK to run the tool.

    The Layer field now displays the value MyLayer for all records.

Adding the LyrColor field

The LyrColor field specifies the color for the layer. Use Field Calculator to specify the color number.

Steps:
  1. Right-click the feature layer in the table of contents and click Open Attribute Table.
  2. Click the General Tabular Operations button Table Options on the attribute table menu bar and click Add Field to open the dialog box.
  3. Type the field name LyrColor in the Name text box.
  4. Click the Type arrow and click Short Integer to assign the data type.
  5. Click OK to close the dialog box and create the field.
  6. Right-click the LyrColor field name in the attribute table and click Field Calculator Calculator on the shortcut menu.
    • Clear any existing values in the Expression text box.
  7. Type the number 1 in the Expression text box.
  8. Click OK to run the tool.

    The LyrColor field now displays the value 1 for all records.

Run the Export To CAD tool

Steps:
  1. Using the Search window Search Window, find and open the Export To CAD tool.
  2. Drag the feature layer that contains the reserved CAD fields from the table of contents to the Input Features text box.
  3. Click the Output Type arrow and choose a CAD format.
  4. Click the Output File browse button Browse, navigate to a folder, type a name, then click Save.
    • Or accept the default path and file name.
  5. Click OK to run the tool and generate the CAD file.

Open the Layer Properties dialog box and click the Drawing Layers tab to verify your results with the CAD feature layer in the newly created CAD dataset.

NoteNote:

AutoCAD uses a fixed, numbered, 256-color palette starting at 1 (red). A MicroStation seed file could have a unique custom color table. For example, color 1 may be red in one MicroStation file, but it may be blue in another.

Related Topics


Published 6/8/2010