Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This question already has an answer here:

I want to make a list of cons numbers(ex. 1,2,3...) in field calculator (VBA). When I am putting for example: (dim d d=[field]+1). The result is all my fields are =1. How to solve this arc map (vba). Thanks.

share|improve this question

marked as duplicate by whuber Feb 24 '13 at 19:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

Do you mean you want to populate a field with a sequential series of numbers? If so look at Calculate Field Examples. An example is provided in Python:

Calculate a sequential ID or number based on an interval.

Expression:

autoIncrement()

Code Block:

rec=0
def autoIncrement():
 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 rec
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.