AnsweredAssumed Answered

Determining Selected Layers in the Table of Contents with ArcPy

Question asked by TomFlahive on Oct 7, 2013
Latest reply on Oct 10, 2013 by TomFlahive
Is there a way to determine which layers are selected in the Table of Contents using ArcPy?  Lets say you drag in 10 shapefiles into ArcMap, and then you select 4 of the 10 layers using the mouse cursor (by holding down the Ctrl key to select multiple layers).  Is there a way with ArcPy to determine if a layer is selected or not?  What I would like to do is to write a script that loops through all the layers in the Table of Contents, and if a layer is selected, the script will add a particular field to that layer.  So I need a way of determining whether a layer is selected or not.  Thanks.

Outcomes