Is This Content Helpful?
We're glad to know this article was helpful.
This sample script will add X,Y coordinate values to a shapefile attribute table.
This script adds two fields, XCoord and YCoord, to store the x,y values in the coordinate system specified in the shapefile. It only works on point or polygon shapefiles.
Make sure the data is the active theme and the view is the last active window before returning to the Script window to run it or else the script will not work.