Subsequent to Auto incrementing every second row in ArcGIS Desktop? , how can i start the auto increment from the second field (i work with 150 fields)
so the result will be:
Subsequent to Auto incrementing every second row in ArcGIS Desktop? , how can i start the auto increment from the second field (i work with 150 fields)
so the result will be:
rec=0
action = 'repeat'
def autoIncrement():
global rec
global action
pStart = 1
pInterval = 1
if (rec == 0):
rec = pStart
return rec
else:
if action == 'count':
rec += pInterval
action = 'repeat'
return rec
elif action == 'repeat':
action = 'count'
return rec
autoIncrement()