Name: AddXYExample2.py Description: Adding XY points to the climate dataset Import system modules import arcpy from arcpy import env Set workspace env.workspace 'C:/data' Set local variables indata 'climate.shp' infeatures 'climateXPpts2.shp' Copying data to preserve original dataset Execute Copy arcpy.Copymanagement(indata, infeatures) Execute AddXY arcpy.
#ARCMAP ADD XY DATA TOOLBAR SHORTCUT HOW TO#
Project the data into a coordinate system that uses the units the values should be in, and perform the calculation. The following Python script demonstrates how to use the AddXY function in a stand-alone script. Add a conversion into the calculation expression. To display calculated data in different units other than the data's units, perform one of the following: If the data is stored in feet, the calculated values appear in feet. The units of the calculated values are the units the features are stored in, not the map units or display units of the data frame currently worked on.