(If you’re using Firefox, then right click and Save Link As)
Download the Create Unique IDs Toolbox – works with ArcGIS 10.1+
View the Source Code
(any donations go towards hosting costs)
** Run this tool from ArcCatalog, and do not have the feature class / table opened anywhere else.
The Creates Unique IDs tool adds a field called UID and creates a unique ID for each record of an input feature class or table. The unique IDs can be grouped based on a common field attribute and also sorted in ascending or descending order. A prefix and suffix can also be added.
There are currently 3 different techniques to create the unique IDs:
UNIVERSALLY UNIQUE IDENTIFIER – random 32 characters, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RANDOM WITHIN RANGE – unique random numbers within a defined range
INTERVAL – based on a user defined interval
Be sure to view the Tool Help within the tool dialog box for detailed instructions. Also, check the Geoprocessing Results for any error messages.
Here’s a screenshot of the parameters:
I hope someone finds this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!
13 thoughts on “ArcGIS Toolbox – Create Unique ID with ArcPy”