My target is to create a script tool using python where I will select location by area and export the area in the directory. To do so I have used this script
import arcpy
arcpy.env.overwriteOutput = True
try:
inPath = arcpy.GetParameterAsText(0)
inpath2 = arcpy.GetParameterAsText(1)
outPath = arcpy.GetParameterAsText(2)
selection = arcpy.SelectLayerByLocation_management("inPath", "WITHIN_A_DISTANCE", "inpath2", "50 meter","NEW_SELECTION","NOT_INVERT")
copySelection = arcpy.CopyFeatures_management(selection,outPath)
arcpy.GetMessage("All Done")
except:
arcpy.AddError("Could not colplete the process")
arcpy.AddMessage(arcpy.GetMessages())
but running this code in scripting tool toll look like thisgive this error messageError given after running the tool. :Please help me to solve this issue. Thanks in advance.