<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic arcpy.mapping: Determine if nothing is selected in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-mapping-determine-if-nothing-is-selected/m-p/144088#M11176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just need to be able to determine if nothing is selected.&amp;nbsp; SearchCusors and GetCount_management only return either just the selected features or all of the features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...pretty sure I am missing the obvious here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 May 2013 19:01:30 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2013-05-07T19:01:30Z</dc:date>
    <item>
      <title>arcpy.mapping: Determine if nothing is selected</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-determine-if-nothing-is-selected/m-p/144088#M11176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just need to be able to determine if nothing is selected.&amp;nbsp; SearchCusors and GetCount_management only return either just the selected features or all of the features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...pretty sure I am missing the obvious here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 19:01:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-determine-if-nothing-is-selected/m-p/144088#M11176</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-05-07T19:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mapping: Determine if nothing is selected</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-determine-if-nothing-is-selected/m-p/144089#M11177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;...huh.&amp;nbsp; Seems like a get this great "GetCount" thingie, then I am expecting a similar method for zero selected features -- guess not.&amp;nbsp; This works but...&amp;nbsp; well, it works. (solution found 4 pages deep on a Google search!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; for lyr in arcpy.mapping.ListLayers(mxd): &amp;nbsp;&amp;nbsp;&amp;nbsp; dsc = arcpy.Describe(lyr) &amp;nbsp;&amp;nbsp;&amp;nbsp; sel_set = dsc.FIDSet &amp;nbsp;&amp;nbsp;&amp;nbsp; if len(sel_set) == 0: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Nothing selected" &amp;nbsp;&amp;nbsp;&amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'do all the stuff &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 19:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-determine-if-nothing-is-selected/m-p/144089#M11177</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-05-07T19:16:07Z</dc:date>
    </item>
  </channel>
</rss>

