I have a feature class with 5 lines in it, and need select each one and turn them into its own raster -- for example, line 1 is raster 1, line 2 is raster 2, etc. This is the python script:
import arcpy SightLines = "C:\\temp\\SightLines.shp" index = 0 rows = arcpy.SearchCursor(SightLines) for row in rows: RasterFileName = "C:\\temp\\fakeData.gdb\\Raster" + str(index) arcpy.AddMessage("Raster File " + RasterFileName) arcpy.FeatureToRaster_conversion(row, "FID", RasterFileName, "1") arcpy.AddMessage(" >> MADE SUCCESSFULLY") index = index + 1
Unfortunately, this is throwing the following error at the FeatureToRaster_conversion step:
raise e RuntimeError: Object: Error in executing tool
I can't figure out what raise e is trying to tell me. What exactly is going wrong?