Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
256
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >>> import arcpy
  2. ... fc = "Flight_Demo5_LineToPoints"
  3. ... n = 1
  4. ... with arcpy.da.UpdateCursor(fc, "alternate") as cursor:
  5. ... for row in cursor:
  6. ... if n == 1:
  7. ... row[0] = 1
  8. ... n = n - 1
  9. ... else:
  10. ... row[0] = 0
  11. ... n = n + 1
  12. ... cursor.updateRow(row)
Advertisement
RAW Paste Data Copied
Advertisement