Summary
Renames one or more existing field name aliases by matching columns from the input table with a list of CAD-specific fields with the appropriate name recognized by the Export To CAD tool.
Usage
The CAD-specific fields in the matching list have the appropriate name and type recognized by the Export To CAD tool. Typically, values already exist in these fields to derive the various CAD entity properties of CAD objects created by the Export To CAD tool.
If a feature class intended for export already contains values useful for driving CAD properties, such as layer name, but the fields have different names, assigning a CAD field alias on that table using the Assign CAD Alias tool is an efficient way to have the Export To CAD tool recognize those values as CAD properties.
To permanently set CAD-specific aliases on an input feature class, use the Set CAD Alias tool, since it has a predefined alias list. To create a temporary alias for a feature layer, use the Make Feature Layer tool in ModelBuilder, which gives you the flexibility to change the alias of the field name for the feature layer.
Using the Add CAD fields tool to build a lookup table is perhaps a better way to create a repeatable system of exporting feature data to CAD files according to some established drawing standard.
These CAD-specific fields are used to specify the various CAD graphic properties and other forms of CAD attribution. A similar tool, Add CAD Fields, is used to add fields to a table for the same export purpose. Assigning a Field Alias differs from Add CAD Fields in that existing fields that may already contain valid values to describe CAD properties in Export To CAD are renamed with an alias rather than adding a field and calculating values.
Shapefiles are not a valid input to this function, since they cannot maintain aliases for fields. If you need to use a shapefile as input, convert the shapefile to a layer file. Layer files or feature classes from a personal geodatabase or SDE geodatabase are valid inputs to this tool.
This tool overwrites the input, so be sure to make a backup of the original data.
Syntax
SetCADAlias(input_table, field_info)
Parameter | Explanation | Data Type |
input_table | The feature class, feature layer, table, or table view to which you would like to assign CAD-specific field name aliases. | Table View |
field_info | Field info relating a list of aliases matched to the list of existing fields in the input table. | Field Info |
Code sample
# Name: SetCadAlias.py
# Description: create aliases
# Author: ESRI
# Import system modules
import arcpy
from arcpy import env
# Set workspace
env.workspace = "c:/Workspace/network.mdb"
arcpy.toolbox = "conversion"
arcpy.setcadalias ("primary_roads", "area area; name layer")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes