<?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: CopyFeatures not recognizing selected features in arcPy script in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121475#M48491</link>
    <description>&lt;P&gt;had been trying to find a way to add a tool parameter, or a step in btw. the selection and the copy Features, but you're right (as I've come to expect!):&amp;nbsp; when I run MakeFeatureLayer &lt;STRONG&gt;first&lt;/STRONG&gt;, to create a counties_lyr, then run the query and the copyFeatures (set to export the (selected features in the) counties _lyr), it works exactly as intended...I don't think the Pro help files makes the need to follow this order of operations clear at all!&amp;nbsp; I sure appreciate the quick, and helpful, help!&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 21:44:14 GMT</pubDate>
    <dc:creator>PhilCrossley1</dc:creator>
    <dc:date>2021-11-30T21:44:14Z</dc:date>
    <item>
      <title>CopyFeatures not recognizing selected features in arcPy script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121447#M48485</link>
      <description>&lt;P&gt;Hi. Have appreciated past help.&lt;/P&gt;&lt;P&gt;I'm trying to incorporate an attribute query into an arcpy script, and then work with the results of that query in a subsequent for: loop.&lt;/P&gt;&lt;P&gt;The script snippet below successfully creates the Indiana folder and GDB, and selects the Indiana counties, and creates a new INcounties feature class, as intended, BUT the new feature class includes ALL the US counties, not just the selected IN counties.&lt;/P&gt;&lt;P&gt;would appreciate any suggestions!&lt;/P&gt;&lt;PRE&gt;arcpy.CreateFolder_management(&lt;SPAN&gt;r"E:\advAppScripting\testing\tornhazard"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Indiana"&lt;/SPAN&gt;)&lt;BR /&gt;arcpy.CreateFileGDB_management(&lt;SPAN&gt;r"E:\advAppScripting\testing\tornhazard\Indiana"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"IN_data"&lt;/SPAN&gt;)&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(&lt;SPAN&gt;"counties.dbf"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                 &lt;SPAN&gt;""""STATE_NAME" = 'Indiana'"""&lt;/SPAN&gt;)&lt;BR /&gt;arcpy.CopyFeatures_management(&lt;SPAN&gt;r"E:\advAppScripting\testing\tornhazard\counties_layer"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                            &lt;SPAN&gt;r"E:\advAppScripting\testing\tornhazard\Indiana\IN_data.gdb\INcounties"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 21:03:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121447#M48485</guid>
      <dc:creator>PhilCrossley1</dc:creator>
      <dc:date>2021-11-30T21:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures not recognizing selected features in arcPy script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121464#M48489</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/select-layer-by-attribute.htm" target="_blank" rel="noopener"&gt;Select Layer By Attribute (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you may need to make a layer or table view first since it is apparently just copying&amp;nbsp;counties_layer over without any selection&lt;/P&gt;&lt;PRE&gt;arcpy.management.SelectLayerByAttribute(in_layer_or_view, {selection_type}, {where_clause}, {invert_where_clause})&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 21:28:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121464#M48489</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-30T21:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures not recognizing selected features in arcPy script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121475#M48491</link>
      <description>&lt;P&gt;had been trying to find a way to add a tool parameter, or a step in btw. the selection and the copy Features, but you're right (as I've come to expect!):&amp;nbsp; when I run MakeFeatureLayer &lt;STRONG&gt;first&lt;/STRONG&gt;, to create a counties_lyr, then run the query and the copyFeatures (set to export the (selected features in the) counties _lyr), it works exactly as intended...I don't think the Pro help files makes the need to follow this order of operations clear at all!&amp;nbsp; I sure appreciate the quick, and helpful, help!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 21:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121475#M48491</guid>
      <dc:creator>PhilCrossley1</dc:creator>
      <dc:date>2021-11-30T21:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures not recognizing selected features in arcPy script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121477#M48492</link>
      <description>&lt;P&gt;No problem Phil.&amp;nbsp; I have a preference to use the Python tab out of the&lt;STRONG&gt;&amp;nbsp;Dialog Python&lt;/STRONG&gt; under Parameters... there is often more information there and the parameter specification tends to be clearer (to me at least)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 21:47:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copyfeatures-not-recognizing-selected-features-in/m-p/1121477#M48492</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-30T21:47:00Z</dc:date>
    </item>
  </channel>
</rss>

