Error with using the Join Field Management tool

09-18-2011 02:23 PM
New Contributor
For ArcGIS 10 SP2 (using the ArcInfo license and Spatial Analyst extension), I am attempting to use the join field tool between a shapefile and a file geodatabase feature class.  However, the script is performing erratically where it works for some machines adding the field and values while other times it only calculates the field with one value (in the screen capture below refer to ElementZ_1) when it should be multiple values as it is correcting the ElementZ value.  It is using the x coordinate field as the joining field.  The script is below.  It is a pretty straight forward script.  The original data is coming from an ArcPAD generated shapefile.  Are there any known issues with the join field tool or any ideas as to what can be causing this issue? 

Thanks for your help.



# Import arcpy module
import arcpy
from arcpy import env

# Overwrite pre-existing files
arcpy.env.overwriteOutput = True

# Check out any necessary licenses

Input_point_features = arcpy.GetParameterAsText(0) #Feature Class

Correction_Field = arcpy.GetParameterAsText(1)

# Local variables:
Input_Raster = "C:\\WorkingFolder\\ArcPad_PascoCo\\Geoid_Correction_2011\\pasco_geoid\\pasco_geoid"
Points_With_Geoid_Elev = "C:\\WorkingFolder\\ArcPad_PascoCo\\Geoid_Correction_2011\\pasco_geoid1\\kathyz.shp"
Interpolate_values_at_the_point_locations = "false"
Field_Name = Correction_Field
Expression_Type = "PYTHON"
Field_Type = "DOUBLE"
Expression = "(!ElementZ!-(!RASTERVALU! * 3.280839))"
Output_Feature_Class = Points_With_Geoid_Elev
Data_type = ""
Input_Join_Field = "ElementX"
Output_Join_Field = "ElementX"
Join_Fields = Correction_Field
Delete_succeeded = Points_With_Geoid_Elev

# Process: Extract Values to Points,Input_Raster , Points_With_Geoid_Elev, "NONE", "VALUE_ONLY")

# Process: Add Field
arcpy.AddField_management(Points_With_Geoid_Elev, Correction_Field, Field_Type, "", "", "", "", "NON_NULLABLE", "NON_REQUIRED", "")

# Process: Calculate Field
arcpy.CalculateField_management(Output_Feature_Class, Field_Name, Expression, Expression_Type, "")

# Process: Join
arcpy.JoinField_management(Input_point_features, Input_Join_Field, Points_With_Geoid_Elev, Output_Join_Field, Join_Fields)

# Process: Delete
arcpy.Delete_management(Points_With_Geoid_Elev, "")

0 Kudos
0 Replies