Skip To Content

Transfer Field Domain Descriptions (Environment setting)

This geoprocessing environment controls whether output shapefiles and dBASE (.dbf) tables will have fields added containing domain and subtype descriptions, in addition to fields containing domain and subtype codes. This setting is only relevant when the input to a geoprocessing tool is a geodatabase feature class or table with domains and subtypes defined. By default, only domain and subtype codes are included in shapefile or dBASE (.dbf) output.

This geoprocessing environment is useful because shapefiles and dBASE (.dbf) tables do not support advanced features such as attribute field domains and subtypes; but some workflows require the output to be one of these formats, and the domain and subtype description information is necessary to maintain.

Learn more about other limitations when using shapefile output

Usage notes

  • If this geoprocessing environment is used, the output shapefile or dBASE (.dbf) table will have additional fields added to the output. If the input has a subtype field, the output will have one field for the subtype code (named after the original field) and one field for the subtype description (named after the original field, and prefixed by d_, for description). If the input has attribute domains, the output will have one field for each of the fields with a domain (named after the original field), containing domain codes, and one field for each of the fields with a domain (named after the original field, and prefixed by d_, for description), containing domain descriptions.
  • When viewing the attribute table or identifying a feature of a geodatabase feature class or table with subtypes and domains defined, the attributes that are presented are the domain and subtype descriptions (not codes).
  • If the information contained in subtype and domain descriptions is necessary, and the output of the operation will be a shapefile or a dBASE (.dbf) table, use this environment setting to ensure that domain and subtype descriptions are added to the output. If both of these conditions are not pertinent, then this environment setting should not be used.
  • Transferring field domain descriptions to the output of the geoprocessing operation will take more time (slower performance) than transferring only the domain and subtype codes. Only use this environment setting if domain and subtype descriptions are specifically needed in the output.

Dialog syntax

  • Unchecked—The output shapefile or dBASE (.dbf) table will not have additional fields containing subtype and domain descriptions. This is the default.
  • Checked—The output shapefile or dBASE (.dbf) table will have additional fields containing subtype and domain descriptions.

Scripting syntax

arcpy.env.transferDomains = transfer_domains

transfer_domainsExplanation

False

The output shapefile or dBASE (.dbf) table will not have additional fields containing subtype and domain descriptions. This can also be set using the NOT_TRANSFER_DOMAINS keyword. This is the default.

True

The output shapefile or dBASE (.dbf) table will have additional fields containing subtype and domain descriptions. This can also be set using the TRANSFER_DOMAINS keyword.

transferDomains syntax
# Name: exportToShapefile.py
# Purpose: Export a geodatabase feature class to a shapefile, include domain and subtype descriptions

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data"
arcpy.env.transferDomains = True
# the equivalent with a keyword is
# arcpy.env.transferDomains = "TRANSFER_DOMAINS"

# Set local variables    
inFeatures = "Habitat_Analysis.gdb/vegtype"
outLocation = "Shapefiles"
outName = "Vegetation.shp"

arcpy.conversion.FeatureClassToFeatureClass(inFeatures, outLocation, outName)

Related topics