Is This Content Helpful?
How can we make this better? Please provide as much detail as possible.
Contact our Support Team
Instructions provided explain how to populate a field in a feature class or stand alone table (DBF, CSV, etc.) with ascending, or ordered values, using an initial value and a designated interval.
Note: The content in this article pertains to ArcGIS versions 8.x and 9.x. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.
To calculate a field using consecutive or stepped values:
Static rec As Long Dim lStart As Long Dim lInterval As Long Dim i As Integer Dim iStringLength As Integer Dim sID As String '============================ 'set the variables below iStringLength = 7 lStart = 1 lInterval = 1 '============================ sID = "" If (rec = 0) Then rec = lStart Else rec = rec + lInterval End If For i = 1 To iStringLength - Len(CStr(rec)) sID = sID & "0" Next i sID = sID & CStr(rec)
Last Published: 7/23/2019
Article ID: 000008783