hartmaab

Join field within Python: No output??

Discussion created by hartmaab on Apr 25, 2012
Latest reply on Apr 25, 2012 by hartmaab
has anyone ever done a join field within Python to produce a join in ArcMap in a attribute table? The join works in ArcMap model builder but does not give us the correct script we are looking to use in PythonWin. We have tried using different extensions and whatnot but some how even when there is an exit code of 0 there is no output within ArcMap. Does anyone have suggestions?  Any hints that could help us identify the problem at hand? Thanks!

this is an example of script as is right now
import arcpy
try:
    from arcpy import env
   
    #set workspace
    env.workspace = "E:\python\Final\Dan"

    #local parameters   
    inFeatures = "aslc940_polygon_Project"
    layerName = "Export_Output_Ashland"
    joinField = "GRID_CODE"
    joinTable = "lulc_gridcode_crosswalk"
    joinField2 = "Code"
    fieldList = "land_cover"

    arcpy.JoinField_management (inFeatures, joinField, joinTable, joinField2, fieldList)

except:
    arcpy.GetMessages(2)

Outcomes