<?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 How to identify layer within group in ArcGIS Pro in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034403#M60307</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to identify a layer within a group and create that object for my script.&lt;/P&gt;&lt;P&gt;This would be the script line I follow to create an object for just a 'standard' layer:&lt;/P&gt;&lt;P&gt;road_ln = map_generic.listLayers("Road")[0]&lt;/P&gt;&lt;P&gt;If I were to do the same for a layer within a group layer, I identify the following structure as below&lt;/P&gt;&lt;P&gt;Network/Road&lt;/P&gt;&lt;P&gt;... with Network being the Group Layer and Road the Layer within that specific group.&lt;/P&gt;&lt;P&gt;Following this logic, I then go and try the below without success:&lt;/P&gt;&lt;P&gt;road_ln_grp = map_generic.listLayers("Network/Road")[0]&lt;/P&gt;&lt;P&gt;I have been going through documentations and the community these past days.&lt;/P&gt;&lt;P&gt;Any idea how I am able to do so?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Mar 2021 12:34:39 GMT</pubDate>
    <dc:creator>anamanvil</dc:creator>
    <dc:date>2021-03-09T12:34:39Z</dc:date>
    <item>
      <title>How to identify layer within group in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034403#M60307</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to identify a layer within a group and create that object for my script.&lt;/P&gt;&lt;P&gt;This would be the script line I follow to create an object for just a 'standard' layer:&lt;/P&gt;&lt;P&gt;road_ln = map_generic.listLayers("Road")[0]&lt;/P&gt;&lt;P&gt;If I were to do the same for a layer within a group layer, I identify the following structure as below&lt;/P&gt;&lt;P&gt;Network/Road&lt;/P&gt;&lt;P&gt;... with Network being the Group Layer and Road the Layer within that specific group.&lt;/P&gt;&lt;P&gt;Following this logic, I then go and try the below without success:&lt;/P&gt;&lt;P&gt;road_ln_grp = map_generic.listLayers("Network/Road")[0]&lt;/P&gt;&lt;P&gt;I have been going through documentations and the community these past days.&lt;/P&gt;&lt;P&gt;Any idea how I am able to do so?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 12:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034403#M60307</guid>
      <dc:creator>anamanvil</dc:creator>
      <dc:date>2021-03-09T12:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify layer within group in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034407#M60308</link>
      <description>&lt;P&gt;Check the code provided in this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/listing-layers-in-a-group/td-p/736543" target="_self"&gt;https://community.esri.com/t5/python-questions/listing-layers-in-a-group/td-p/736543&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/105462"&gt;@FC_Basson&lt;/a&gt;provided this example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;proj = arcpy.mp.ArcGISProject('CURRENT')
m = proj.listMaps()[0]
ml = m.listLayers()
for l in ml:
   if l.isGroupLayer:
      print(l)
      lyrs = l.listLayers()
      for lyr in lyrs:
         print(lyr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 13:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034407#M60308</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-09T13:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify layer within group in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034460#M60311</link>
      <description>&lt;P&gt;Thanks for your prompt reply&amp;nbsp;@Anonymous User&amp;nbsp;This is exactly what I needed &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 14:51:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-identify-layer-within-group-in-arcgis-pro/m-p/1034460#M60311</guid>
      <dc:creator>anamanvil</dc:creator>
      <dc:date>2021-03-09T14:51:39Z</dc:date>
    </item>
  </channel>
</rss>

