idfield - On Editor toolbar click Start Editing ...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
How to Create a Sequential Unique ID Field in ArcGIS. The following is easier to do in a statistical software program such as Stata (gen id = _n) or in Excel (format an id field as text, type 1 in the first cell and 2 in the second cell, then drag the fill handle (the small black square in the lower-right corner of the selection rectangle) to the end of the range of values. (If the fill handle is missing: click Options on the Tools menu > click Edit tab > check the box for Allow cell drag and drop.) § Open attribute table > Add new field > Format field-type=numeric.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: § On Editor toolbar, click Start Editing. § Right-click the new number field in the attribute table > Calculate Values > Check Advanced box § Copy the following code into the Pre Logic VBA Script code: Static rec As Long Dim pStart As Long Dim pInterval As Long pStart = 1 pInterval = 1 If (rec = 0) Then rec = pStart Else rec = rec + pInterval End If § Type the word rec in the text box under [Your Field Name] = § Click OK 427...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online