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

Dialog syntax

Scripting syntax

arcpy.env.transferDomains = transfer_domains

transfer_domains

Explanation

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
from arcpy import env


# Set environment settings
env.workspace = "C:/data"
env.transferDomains = True
# the equivalent with a keyword is
# 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

3/3/2014