Saturday, 6 February 2016

arcgis 10.1 - Getting all results from Selection made by Attribute or Location using ArcPy?


Using arcpy I'm trying to get the results of a selection, or what is currently selected as a list.


Basically I'm attempting to build an addin which on click will either perform an operation where I invoke SelectLayerByAttribute_management (or ByLocation) to select some features, or the user performs a selection ByAttribute (or ByLocation), and while they have their selection hightlighted executes my snippet by pressing a button on the toolbar. In each case I want to get a list of results to perform a specific task on only certain selected features.


I can't find out how to get a list of the currently selected features, or find a listener for selection having been made so I can enable the button, and ensure I can perform my operation on an existing selection.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...