<?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: Unselect features from arcpy.GetCounty_management in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632749#M49297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You remove features from a selection using the same tool as you use to add them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-attribute.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-attribute.htm"&gt;Select Layer By Attribute—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-location.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-location.htm"&gt;Select Layer By Location—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the 'selection_type' parameter, 'REMOVE_FROM_SELECTION' option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 May 2017 20:15:51 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2017-05-31T20:15:51Z</dc:date>
    <item>
      <title>Unselect features from arcpy.GetCount_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632746#M49294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script that runs in arcmap Python window. It does a select layer by location then exports the selected features but i need to remove features with Null or empty attributes in a specific filed before acpy.TableToTable but some times there will be none with Null or empty attributes. I am not sure how to do that so if someone could show me how to this it would be awesome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently this is the code i&amp;nbsp; have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;TA = "TAXLOTS"
SP4 = "SUBJECT_PROPERTY"

arcpy.SelectLayerByLocation_management(TA, "WITHIN_A_DISTANCE", SP4, "600 Feet", "NEW_SELECTION")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if int(arcpy.GetCount_management("TAXLOTS").getOutput(0)) &amp;gt; 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.TableToTable_conversion("TAXLOTS", wp, "NOTIFIED_LOTS.dbf")

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management("TAXLOTS", "CLEAR_SELECTION")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; pass‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:55:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632746#M49294</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T02:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCounty_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632747#M49295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many fields are in this layer?&amp;nbsp; Do you want to exclude records if a certain field or two has a NULL or empty, or do you want to drop a record if any field has a NULL or empty?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 18:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632747#M49295</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-05-31T18:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCounty_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632748#M49296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is about 10 fields in the layer. Of the selected I would like to exclude records if a certain field is NULL or empty .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 20:10:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632748#M49296</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2017-05-31T20:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCounty_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632749#M49297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You remove features from a selection using the same tool as you use to add them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-attribute.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-attribute.htm"&gt;Select Layer By Attribute—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-location.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/select-layer-by-location.htm"&gt;Select Layer By Location—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the 'selection_type' parameter, 'REMOVE_FROM_SELECTION' option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 20:15:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632749#M49297</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2017-05-31T20:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCount_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632750#M49298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured i was over looking something simple.&lt;/P&gt;&lt;P&gt;Will line 2 this handle NULL's ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if int(arcpy.GetCount_management("TAXLOTS").getOutput(0)) &amp;gt; 0:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttribute_management("TAXLOTS", "REMOVE_FROM_SELECTION", "\"DXF_TEXT\" = ' '")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 21:35:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632750#M49298</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2017-05-31T21:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCount_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632751#M49299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Will line 2 this handle NULL's ?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, you need to handle both cases - blank and null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetCount_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TAXLOTS"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getOutput&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"TAXLOTS"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"REMOVE_FROM_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"DXF_TEXT = ' ' OR DXF_TEXT IS NULL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632751#M49299</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T02:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCount_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632752#M49300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;CODE&gt;With i run the following in ArcMap python window&amp;nbsp; 
&lt;/CODE&gt;&lt;/CODE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;if&lt;/SPAN&gt; int&lt;SPAN class=""&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class=""&gt;.&lt;/SPAN&gt;GetCount_management&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"TAXLOTS"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;getOutput&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class=""&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;"DXF_TEXT = ' ' OR DXF_TEXT IS NULL" &lt;/SPAN&gt;&lt;/CODE&gt;
&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;I get error,&lt;BR /&gt;ERROR 000732: Selecting Features: Dataset DXF_TEXT = '' OR DXF_TEXT IS NULL does not exist or is not supported&lt;BR /&gt;Failed to execute (SelectLayerByLocation).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The blank and NULL records don't get removed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632752#M49300</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T02:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCount_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632753#M49301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are missing the first two arguments for the Select Layer By Attribute tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:19:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632753#M49301</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2017-06-06T19:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unselect features from arcpy.GetCount_management</title>
      <link>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632754#M49302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oh my bad i had 'Select by Location' instead of 'Select layer by attribute'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unselect-features-from-arcpy-getcount-management/m-p/632754#M49302</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2017-06-06T19:49:47Z</dc:date>
    </item>
  </channel>
</rss>

