I am trying to find a way to get user input for a python script. What I want to do is ask the user to select a point on the map and then use the x,y values in another step in the script. I have a feeling that ArcGIS Pro and arcpy do not have this capability, yet. What I am really looking for is to be able to get an address (or event) along a route at the location indicated by the user... So, I want the script to ask the user to select the location along the route that they want to know the closest address for.
I have been able to create an event table using address points and displaying them on the route. I want to go the other way and determine what the address would be at the selected location. I know there was (or is) a tool in ArcMap which gives you an address along a route... still waiting for something like that in Pro.
Solved! Go to Solution.
like this functionality ? Introduction to identifying addresses and places on the map—ArcGIS Pro | Documentation
Also, if it is something that can actually be selected, most tools work with selections rather than all features.
So perhaps what you intend to do next might be critical
Hi @DanPatterson ,
I read through that information but am not excited about reverse geocoding or creating a locator at this time.
I am looking into whether there is a tool already in Pro/arcpy to get input from the user when they click on the map. I was going to use that clicked point x,y to find the address on a route. Instead, I generated a table of events for my route and drew all of them on the route so the user could identify the one closest to the location they are addressing. My script gets the address points in the map extent, reads the route id from the address points, gets the address range from a sql table of routes, creates an event table from that information and then draws a point feature at each event location...
I was hoping that there was a tool in Pro like the tool in ArcMap that gives you the address information at any point along the route... I may be remembering wrong and actually had locators setup in ArcMap.
You could physically create a point in the tool using FeatureSet—ArcGIS Pro | Documentation - which will then allow interactive point drawing. Then do whatever process within the script to get the point x/y or address.
I don't do the geocode thing, but
has changed and @JoeBorgione would be the man that has suffered with addresses and stuff
...not excited about reverse geocoding or creating a locator at this time.
Life is all about trade-offs, I guess. In your case I think you'll need to go the route suggested by @JeffK as I don't know how to capture a mouse click/reverse geocoded point to python.