1

I have a question about sequential numbering. I found a script (i'll put it below), which allows me to make a sequential numbering based on OID and thats good. But what i need is different structure of numbering... for example, sometimes i need numbering from top to bottom of polygons line, sometimes from left to right or from bottom to top and so on. I'am using Arcgis pro (but example is made using simple arcmap)

Code block:

rec=0 
def autoIncrement(string_prefix):
 global rec
 pStart = 1 #adjust start value, if req'd 
 pInterval = 1 #adjust interval value, if req'd
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return string_prefix + str (rec)

.

autoIncrement("11A-5-(this number is changes sequentially"))

enter image description here

BERA
  • 72,339
  • 13
  • 72
  • 161
Darius
  • 119
  • 6
  • 1
    Welcome to Geographic Information Systems! Can you please edit your question and add more details about what your problem/question is?. What happens when you run that expression in the field calculator, etc... ? Thanks! – user2856 Jan 26 '19 at 12:07
  • Please format your code using the { } button for readability. – Andy Jan 26 '19 at 23:12
  • You can use arcpy, see for example: https://gis.stackexchange.com/questions/301725/assigning-numbers-to-grid-of-polygons-using-arcpy/301730#301730 Just change the sort function – BERA Jan 27 '19 at 06:17

0 Answers0