> Script Details
Spatial Unique ID Tool
report inappropriate content
Aug 25 2005
Status of work
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trial-version, or an advertisement for a retail product.
This tool helps sequentially ID features of point or polygon layers with a twist... It allows you to sort all features or selected features by the X, Y coordinates and then ID them sequentially. You can use prefixes, define the starting number and increment backwards if you wish. You do not have to sort spatially, i.e. you can use this tool to just add Unique IDs to any old feature layer. All code is in the form, for use in VBA.
Revised to Version 4 - November 25, 2003 Revisions include:
-Corrected problem where using existing ID field that was numeric was not allowed, because of prefix check. Now allows numeric ID fields.
-Added error checking so that the tool will not write over any value for the ID field. It will only write in Null or blank fields, works for ID fields that are strings or numbers.
-Fixed problem where non feature layers in the map would cause the form not to open, type mismatch error. Any non-feature layer is now skipped when adding layer names in the map to the combo box.
See Readme for complete list of revisions.
Version 5 Aug 25, 2005
Updated the code to work at ArcGIS 9.x