English

How To: Use the addxycoo.ave sample script

Summary

This sample script will add X,Y coordinate values to a shapefile attribute table.

Procedure

  1. Open a Script window and select Tile under the Window menu to display both the View and Script windows.
  2. Click Script > Load Text File. Load this sample script and click OK:

    ..\ESRI\AV_GIS30\ArcView\Samples\addxycoo.ave 


    Note:
    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.

  3. Make the View window active and click the Add Theme button. Select the theme you want to add the X,Y coordinates.
  4. Make the Script window active then click the compile button
    [O-Image] Script compile button
    and the run script button
    [O-Image] Run compiled script button
    .

    Warning:
    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.