Is This Content Helpful?
How can we make this better? Please provide as much detail as possible.
Contact our Support Team
Instructions provided describe how to create sequential numbers in a field using Python in the Field Calculator.
Note: The code in this article generates sequential numbers for unsorted data based on the OID or FID order. If the data is sorted on a field, the generated numbers will not be sequential.
rec=0 def autoIncrement(): global rec pStart = 1 pInterval = 1 if (rec == 0): rec = pStart else: rec += pInterval return rec
autoIncrement()
Last Published: 6/27/2019
Article ID: 000011137