AnsweredAssumed Answered

Im Trying to use a loop to create seperate buffers for each row from attribute values

Question asked by GISGURU_001 on Sep 8, 2012
Latest reply on Sep 27, 2012 by GISGURU_001
Im Trying to use a loop to create seperate buffers for each of the row from attribute values of a field in a  feature using searchcursor, but its not working the code i used is below;

mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] fc = "Parcels" field = "Plot_No" cursor = arcpy.SearchCursor(fc) for row in cursor:     val = row.getValue(field) for val in fc:     outFC = str(val) + "_Buffer" + ".shp"     arcpy.Buffer_analysis(str(val),outFC,"15 meters","FULL","ROUND","NONE")


The error message

Runtime error  Traceback (most recent call last):   File "<string>", line 3, in <module>   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\analysis.py", line 687, in Buffer     raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset K does not exist or is not supported Failed to execute (Buffer).  


Please what im i doing wrong? Thanks

Outcomes