Hi,I'm having an issue with using the new da cursors in Arc 10.1. I have a basic script that uses selected features ("watpoints") and copies them to an abandoned layer (watabdev)
arcpy.MakeFeatureLayer_management(point,"watpoints")
with arcpy.da.InsertCursor(watabdev,("SUBTYPE","SHAPE@XY")) as cur:
with arcpy.da.SearchCursor("watpoints",["SHAPE@XY"]) as cursor:
for row in cursor:
cur.insertRow((1,row[0]))
del cur, row, cursor
I used with cursors and tried deleting the cursors afterwords. But after I run the tool, arcmap gives me an error that the abandoned layer is in a closed state and I cannot access it.Any suggestions?Thanks.