Store
|
Contact Us
|
Careers
Home
Industries
Products
Training
Support
Services
Events
News
About
About Esri
Careers
Esri Video
Partners
Support
Search Support
You are here: >
ArcScripts
>
Search Results
> Script Details
Login
|
Feedback
|
Help
Add x and y to the attribute table of a point or polygon layer
contact author
|
download help
|
report inappropriate content
Author
Xiaoming Yang
File Name
addxy2ptpy.txt
Language
Visual Basic
Last Modified
Feb 18 2004
Status of work
Public Domain
Software
ArcGIS Desktop
File Size
6.59 kb
Downloads
7225
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.
Summary
The program adds x and y coordinates (Centroid or label point) to the selected polygon or point feature layer in an ArcMap data frame. If the field XCOORD or YCOORD does not exist in the layer, the program will add the field to the layer attribute table. The values of the coordinates that are added to the attribute table are in same coordinate and projection as the one sets in the Data Frame Properties. In that case, user can control what coordinate and projection of the x and y should be in the attribute table.
To make the script work on your ArcMAP,
1. Open your ArcMAP document with the data layer loaded and selected;
2. Start VB Editor by clicking Tools|Macros|visual Basic Editor;
3. Load the script addxy2ptpy.txt to the editor by clicking File|Import File... in the VB Editor
4. Close the VB Editor and return to ArcMAP
5. Run the script by clicking Tools|Macros|Macros... then clicking RUN button while Addxy2Att is highlighted.
Contact Us
|
Privacy
|
Legal
|
Site Map