I am running ArcGIS 10.1 Basic license with Python 2.7.2.
I have a two spatial files: the first listing vessel positions and the second activity on board. I also have a collection of reports in Excel which list events I must investigate by looking at that spatial data. All three files include an ID and a date-time field.
I want to be able to view the spreadsheet, using the mouse to work my way through the spreadsheet selecting events and then using the ID and the date-time to view the corresponding spatial data. I am thinking a Definition Query and then Zoom to Layer.
I need the flexibility to jump around in the spreadsheet -- perhaps weeks later jumping back into the spreadsheet and following up on the original investigation of a particular event. So, cycling through the spreadsheet in order with a cursor is not what I want.
I would also like to be able to update a field listing the status of the investigation.
The challenge, of course, is accessing that record manually selected from the spreadsheet and pulling out the ID and date time and updating the status of the event.
I have considered a few of approaches.
Select the record outside of Python and then use button to activate a tool. The problem is that one cannot access the selection with Python.
Start in the Python script and then select the record. Does anyone know how to display a table view in Python and then make a selection manually?
Select the record manually outside of Python and then export the record to a named table or file. Start a Python script that always works with the named table or file and its single record.
I have searched this site and have not found anyone trying to do this. Can anyone offer advice?
Can you supply a little more detail about accessing a selected feature in a layer with a Python add-in button?
I have read the ESRI documentation on ArcPy add-ins, introduced with ArcGIS 10. The documentation says that an add-in is required to generate an action in response to an event or when the mouse is used to interact with the diaplay.
However, there is nothing in the Python add-in classes that speaks to selecting records in a table.
– Doug H Apr 15 '15 at 21:44