GIS
Increment a numeric value
Have you ever wanted to increment or increase the value of a field by 1 or a fixed amount? Here are the steps to do so in ArcMap 9.x:
1. Add or use an existing numeric field(Short Integer, Long Integer, Double).
2. Start an edit session.
3. Right click on the numeric field from step 1, and click Calculate Values.
4. Check the Advanced check box.
5. Paste in the following code into the Pre Logic VBA Script code:
Static rec As Long
Dim pStart As Long
Dim pInterval As Long
pStart = 1
' Make pStart equal whatever number you want to start at.
pInterval = 1
' Make pInterval equal whatever number you want to increment by.
If (rec = 0) Then
rec = pStart
Else
rec = rec + pInterval
End If
6. Type the word "rec" into the bottom text box (below fieldname =).
7. Hit the OK button to run and remember to Save your edits.
This was based on the instructions at: http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleS...
Recent comments
18 hours 48 min ago
2 weeks 2 days ago
2 weeks 3 days ago
5 weeks 1 day ago
5 weeks 1 day ago
8 weeks 4 days ago
8 weeks 4 days ago
25 weeks 5 days ago
28 weeks 18 hours ago
29 weeks 3 days ago