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
13 min 35 sec ago
13 min 50 sec ago
14 min 1 sec ago
14 min 12 sec ago
14 min 19 sec ago
16 min 9 sec ago
16 min 12 sec ago
16 min 22 sec ago
16 min 26 sec ago
18 min 49 sec ago