<?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: arcpy.mapping.ListLayers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406348#M32001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
param1 = arcpy.getParameterAsText(0)
lyrList = param1.split(';')
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The multivalue paramater will return you the values seperated by semi-colon if you use the split method on a string it will return you a list of items delimited by the character you pass into the method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:29:06 GMT</pubDate>
    <dc:creator>ChrisFox3</dc:creator>
    <dc:date>2021-12-11T18:29:06Z</dc:date>
    <item>
      <title>arcpy.mapping.ListLayers</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406344#M31997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 20 features classes, each with multiple fields, but ALL containing a field titled "AFE_Number."&amp;nbsp; I need to create a script to loop through a list of All feature classes and select any/all with the "AFE_Number" field containing a specific #.&amp;nbsp;&amp;nbsp; I am able to generate a list of the necessary features, but am unable to selectbyattribute for more than one at a time.&amp;nbsp; Any suggestions?&amp;nbsp; Thanks a bunch&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 19:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406344#M31997</guid>
      <dc:creator>MarkCollins1</dc:creator>
      <dc:date>2011-12-01T19:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mapping.ListLayers</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406345#M31998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;SelectByAttribute works on only one FC at a time.&amp;nbsp; Can't you simply build a list of FCs and loop through them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
lyrs = [lyr1, lyr2, lyr3, etc]
query = ' "AFE_Number' = SomeValue '
for lyr in lyrs:
&amp;nbsp; arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", query)
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:29:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406345#M31998</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-12-11T18:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mapping.ListLayers</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406346#M31999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe you are right about creating a list of fc's [a,b,c,...] and looping.&amp;nbsp; Seems to be my only option.&amp;nbsp; I appreciate your input.&amp;nbsp; Im still new to the Python game and needed some advice.&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 15:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406346#M31999</guid>
      <dc:creator>MarkCollins1</dc:creator>
      <dc:date>2011-12-02T15:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mapping.ListLayers</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406347#M32000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to populate a list file via an arcpy.GetParameterAsText()&amp;nbsp; ?&amp;nbsp;&amp;nbsp;&amp;nbsp; Set a list [] variable equal to the value/s of a GetParametAsText.&amp;nbsp; Seems like you could add the script in ArcMap and set the parameters as a multivalue and select all feature classes, then loop through them.&amp;nbsp;&amp;nbsp; Any ideas if something like this could work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 16:48:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406347#M32000</guid>
      <dc:creator>MarkCollins1</dc:creator>
      <dc:date>2011-12-02T16:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mapping.ListLayers</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406348#M32001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
param1 = arcpy.getParameterAsText(0)
lyrList = param1.split(';')
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The multivalue paramater will return you the values seperated by semi-colon if you use the split method on a string it will return you a list of items delimited by the character you pass into the method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:29:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mapping-listlayers/m-p/406348#M32001</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2021-12-11T18:29:06Z</dc:date>
    </item>
  </channel>
</rss>

