ERROR 000732: Input Features: Dataset 'Z:\DATA FOR 2009\Base.gdb\CREEKS_UTM' does not exist or is not supported
Y:\2012_data\INFRASTRUCTURE.gdb\Buildings;'Z:\DATA FOR 2009\Base.gdb\CREEKS_UTM';'Z:\DATA FOR 2009\Base.gdb\LAKES_UTM'
import arcpy, os inLines = arcpy.GetParameterAsText(0) inRaster = arcpy.GetParameterAsText(1) outRaster = arcpy.GetParameterAsText(2) pnt_array = arcpy.Array() extent = arcpy.Raster(inRaster).extent pnt_array.add(extent.lowerLeft) pnt_array.add(extent.lowerRight) pnt_array.add(extent.upperRight) pnt_array.add(extent.upperLeft) poly = arcpy.Polygon(pnt_array) for shp in inLines.split(';'): arcpy.AddMessage(shp) arcpy.AddMessage(os.path.isabs(shp)) if os.path.isabs(shp) == True: arcpy.AddMessage('if') (filename, ext) = os.path.splitext(os.path.basename(shp)) arcpy.Clip_analysis(shp, poly, outRaster + "\\" + str(filename) + "_Clip") else: arcpy.AddMessage('else') arcpy.Clip_analysis(shp, poly, outRaster + "\\" + str(shp) + "_Clip")Solved! Go to Solution.
shpPath = shp.strip("'")shpPath = shp.strip("'")if os.path.isabs(shp[1:-1]) == True: