Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- fc = r'C:pathtoyourfc'
- startNumber = 51
- with arcpy.da.UpdateCursor(fc, "myField") as cursor:
- for row in cursor:
- row[0] = startNumber
- startNumber = startNumber + 1
- cursor.updateRow(row)
- import arcpy
- fc = r'C:pathtoyourfc'
- startNumber = 51
- endNumber = 75
- with arcpy.da.UpdateCursor(fc, "myField") as cursor:
- for row in cursor:
- if startNumber <= endNumber:
- row[0] = startNumber
- startNumber = startNumber + 1
- cursor.updateRow(row)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement