AnsweredAssumed Answered

AddJoin failed

Question asked by helenak on Jun 30, 2013
Latest reply on Jul 2, 2013 by helenak
System: Vista, ArcGIS 9.3

Hello,

I wrote a python code to AddJoin a grid shapefile (File A) to a bird range shapefile (File B).
They have a field in common (GID).

However, the error message is
ERROR 000732: Input Features: Dataset H:/temp_D/testt does not exist or is not supported
Failed to execute (MakeFeatureLayer).

Please kindly advise how to modify the code.
Thank you.
(The file location is
"H:/temp_D/testt/grid.shp"
"H:/temp_D/test/birdrange.shp")

#Import standard library modules import arcgisscripting import os  #Create the Geoprocessor object gp = arcgisscripting.create(9.3)  #Get a list of the featureclasses in the input folder source_fc = "H:/temp_D/testt" Entity = "H:/temp_D/test" outputfolder = "H:/temp_D"  gp.Toolbox = "Data Management"      # convert a featureclass to a layer  gp.MakeFeatureLayer_management (source_fc, "source_lyr")  # have Layers for AddJoin gp.AddJoin_management("source_lyr", "GID", Entity, "GID", "KEEP_ALL")  # convert a layer to a featureclass  gp.CopyFeatures_management ("source_lyr", source_fc) gp.FeatureClassToShapefile_conversion(source_fc, outputfolder)  # clear memory of layers gp.Delete("source_lyr")      gp.AddMessage(gp.GetMessages()) print gp.GetMessages()

Outcomes