<?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 Re: Clear Selected Features in All layers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545311#M42539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But is there anyway to achieve the same in arcpy?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes... Christopher's answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 19:35:16 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2013-04-11T19:35:16Z</dc:date>
    <item>
      <title>Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545306#M42534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking for a way with python to clear all selected features in my dataframe. Like the "Clear Selected Features" button in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been looking for this online and just could not find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing I can find is SelectLayerByAttribute_management(in_layer_or_view,"CLEAR_SELECTION")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem there is, that I need to feed it a specific layer, but I want to clear the selection in every layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone know the answer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 17:24:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545306#M42534</guid>
      <dc:creator>TimWitt</dc:creator>
      <dc:date>2013-04-11T17:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545307#M42535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried looping through your layers in your dataframe?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;for lyr in arcpy.mapping.ListLayers(mxd,"",df): &amp;nbsp; SelectLayerByAttribute_management(lyr,"CLEAR_SELECTION")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That should take each layer in your dataframe and clear any selected features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris B.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 18:17:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545307#M42535</guid>
      <dc:creator>ChristopherBlinn1</dc:creator>
      <dc:date>2013-04-11T18:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545308#M42536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works, but it slows&amp;nbsp; down my script a lot since I have 40 layers in my mxd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was just surprised I couldn't find anything, since there is a button that clears everything.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 18:41:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545308#M42536</guid>
      <dc:creator>TimWitt</dc:creator>
      <dc:date>2013-04-11T18:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545309#M42537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;there is a button that clears everything.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is available through ArcObjects, not arcpy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=992&amp;amp;t=274217"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=992&amp;amp;t=274217&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 18:45:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545309#M42537</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-04-11T18:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545310#M42538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That is available through ArcObjects, not arcpy.&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=992&amp;amp;t=274217"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=992&amp;amp;t=274217&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But is there anyway to achieve the same in arcpy?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 19:05:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545310#M42538</guid>
      <dc:creator>TimWitt</dc:creator>
      <dc:date>2013-04-11T19:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545311#M42539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But is there anyway to achieve the same in arcpy?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes... Christopher's answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 19:35:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/545311#M42539</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-04-11T19:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Selected Features in All layers</title>
      <link>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/1349243#M69231</link>
      <description>&lt;P&gt;Pro solution:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")
map = aprx.listMaps('Your Map')[0]
map.clearSelection()&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/map-class.htm" target="_blank"&gt;Map—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 16:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clear-selected-features-in-all-layers/m-p/1349243#M69231</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2023-11-14T16:48:33Z</dc:date>
    </item>
  </channel>
</rss>

