Thanks so much, John. This is great so far!
I've decided to start with taking user input of the coordinates, and then plotting the point from there. Making an add-in seems more difficult, so I think I'll work up to it.
I have figured out how to create my point feature class and take X and Y input from the user.
Could you walk me through adding a point to that feature class based upon an XY value, or decimal degree values? I trying to use this sample code, and edit it to fit my script, but I've got some questions about it.
1. Does the 'counties' feature class already have fields called "NAME" and "SHAPE@XY"? I understand how to add a field called "NAME", but I don't understand how to add a special field that ArcMap will know to plot the point from.
2. I'm assuming that the "SHAPE@XY" token is used to plot the point at the XY coordinates, but I don't understand how tokens work?
3. What parameters are acceptable for cursor.insertRow()? Do I need to loop through a list? That seems unnessecary because I only need one point.
4. Is it possible to plot the point based on decimal degrees?
import arcpy
# A list of values that will be used to construct new rows
#
row_values = [('Anderson', (1409934.4442000017, 1076766.8192000017)),
('Andrews', (752000.2489000037, 1128929.8114))]
# Open an InsertCursor
#
cursor = arcpy.da.InsertCursor("C:/data/texas.gdb/counties",
("NAME", "SHAPE@XY"))
# Insert new rows that include the county name and a x,y coordinate
# pair that represents the county center
#
for row in row_values:
cursor.insertRow(row)
# Delete cursor object
#
del cursor
Also, is it possible to take user input directly from the Python window in ArcMap?
Thank you for bearing with me, I'm about as green as they come in Python 🙂