<?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 property layer.isGroupLayer not working as expected in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709251#M54975</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from the Pro discussion, did you check the next property&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;A layer's&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; font-size: 17px;"&gt;longName&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What does the table of contents for the map show? (screen grab?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Aug 2020 21:07:06 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2020-08-10T21:07:06Z</dc:date>
    <item>
      <title>arcpy property layer.isGroupLayer not working as expected</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709250#M54974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working with arcpy for ArcGIS Pro and trying to manipulate a map in APRX project before converting to PDF. Just stumbled across my own post from earlier in the year...&amp;nbsp;&lt;A href="https://community.esri.com/thread/249329" target="_blank"&gt;How to reorder/add/remove layers APRX map programmatically?&lt;/A&gt;&amp;nbsp;So maybe I'm still not&amp;nbsp;understanding something or&amp;nbsp;there is something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do something similar to what's explained in the post about &lt;A _jive_internal="true" href="https://community.esri.com/thread/203964-ungroup-a-group-layer" target="_blank"&gt;flattening Group Layers&lt;/A&gt;&amp;nbsp;for MXD.&amp;nbsp;But a group layer set up in ArcGIS Pro 2.5 will&amp;nbsp;return ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'My Group Layer'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;isGroupLayer
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To me the group layer should be the 'Parent' as it is in ArcMap or Pro, so the parent should return isGroupLayer = True. Even assuming&amp;nbsp;that arcpy considers the 'Child' the GroupLayer,for me isGroupLayer return 'False' for any/all layers in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the same time, the layer behaves like it's a GroupLayer. Setting&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;childLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...automatically makes the parent visible, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the property&amp;nbsp;isGroupLayer not working correctly, or at least not working as described here -&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/layer-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/layer-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Layer—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately&amp;nbsp;I'm trying to hide the Group Layer name from the Legend. This can be accomplished in Pro but&amp;nbsp;I'm looking for a way to do this in Python and don't see anything the documentation&amp;nbsp; for&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/legendelement-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/legendelement-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;LegendElement—ArcGIS Pro | Documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/502916_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709250#M54974</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-12-12T05:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy property layer.isGroupLayer not working as expected</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709251#M54975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from the Pro discussion, did you check the next property&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;A layer's&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; font-size: 17px;"&gt;longName&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What does the table of contents for the map show? (screen grab?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709251#M54975</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-08-10T21:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy property layer.isGroupLayer not working as expected</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709252#M54976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're referring to&amp;nbsp;checking&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;If the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; font-size: 17px;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value is equal to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; font-size: 17px;"&gt;longName&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value, the layer is not inside a group layer.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, I didn't&amp;nbsp;even catch that... I'll take a look. But it still doesn't explain how you're supposed to use &lt;STRONG&gt;isGroupLayer.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks, Dan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:26:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-property-layer-isgrouplayer-not-working-as/m-p/709252#M54976</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2020-08-10T21:26:04Z</dc:date>
    </item>
  </channel>
</rss>

