Select to view content in your preferred language

pythonaddins.GetSelectedTOCLayerOrDataFrame() should return a list.

1095
3
08-14-2013 01:26 PM
Status: Closed
Labels (1)
BurtMcAlpine
Regular Contributor

pythonaddins.GetSelectedTOCLayerOrDataFrame() is too limited.  Returns "none" if nothing or more than one layer is selected.  It wolud be very nice if it returned a list of items and them we can test if it is a layer object or dataframe object or an empty list. It wolud be much more usable than it is now.  so if i want to execute something for  say five selcetde layers now the user would have to unselect and run the butten (in my case) 5 times changing tho selection between.  If it returned a list it colud all be done at once.  ESRI support said there is no wayto get all selected layers form the toc with a python addin at this time.

3 Comments
JamesStephaniuk
I second this.
TimWitt2

Has this been added?

HannesZiegler
Status changed to: Closed

 

Thank you for your suggestion regarding Python add-ins in ArcMap, and apologies for the very late response. Your post was only recently redirected to the correct ideas exchange for Python/ArcPy ideas. 

Development on ArcMap has ended, and we strongly encourage moving to ArcGIS Pro. However, Python Add-ins are not supported in ArcGIS Pro and there are no plans to support Python Add-ins in ArcGIS Pro in the future. Please see Python Add-Ins for ArcGIS Pro (esri.com) for a full explanation.

We understand that this may be disappointing, but we appreciate your suggestion and hope you will continue to share your thoughts on how we can improve our software. If you have any other suggestions or questions, please don't hesitate to reach out.