k1andrew

translate coded domain values to their text description?

Discussion created by k1andrew on Apr 14, 2011
In a series of .py scripts, I am creating a bunch of tables that contain coded domain values (within a personal gdb).  I'd like to take the tables and make a copy of them with the real values, not the coded domain values. 

I'll be using these tables in subsequent non-GIS processing and reporting and at some point I'll need to translate from the coded domain to the real value and I'm wondering if there is a slick way I can do it at the end of my script?  Below is a snippet from one example:
     

# Process: Run Identity tool with TRACTS and PCA
arcpy.Identity_analysis(TRACTS, PCA, CAF_PCA_IDT)

# Process: Created selected set and copy results out to a new fc
arcpy.MakeFeatureLayer_management (CAF_PCA_IDT, "CAF_PCA_IDTFL", "CANAME <> ''")
arcpy.CopyFeatures_management ("CAF_PCA_IDTFL", CAF_PCA_IDT_SEL)

# Process: Run Frequency 
arcpy.Frequency_analysis(CAF_PCA_IDT_SEL, CAF_TBL_PCA, ["TRACTNAME", "FID_TRACTS", "CANAME", "CATYPE"], "Shape_Area")

Outcomes