Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I feel like this should be really simple and I am missing something. All I wish to do is assign a unique ID to each polygon since I have multiple identical FID values. In MS excel I would simply type 1 then run this value down the rows of the column and it would automatically assign 1,2,3.....n. Can I do something in Arc10? Thanks

share|improve this question
See… for a solution. – whuber Oct 1 '12 at 14:26

According to

Copy the following code to the field calculator code block (python):

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 
  rec = rec + pInterval 
 return rec

Copy this to the window below the code block:

share|improve this answer
I have used this piece of code in several different scenarios, absolutely brilliant. – Cindy Williams-Jayakumar Oct 3 '12 at 11:04

Try this;

  1. Right click on the field to be calculated and Choose "Calculate"
  2. Type [FID]+1
share|improve this answer
This won't create unique IDs since there are "multiple identical FID values" (according to the question). – user3461 Oct 3 '12 at 11:12
By definition, FID's are unique: If your FID's are not unique, you may have an editing session active, or you are no longer in an ArcGIS environment. – pgager Jan 23 '13 at 5:53
Agreed that FIDs should be unique in most cases. Presumably something happened to the data in question that has corrupted the FIDs. – user3461 Jan 23 '13 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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