<?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 FIDSet method returns empty if layer object is in a group layer in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1512975#M71163</link>
    <description>&lt;P&gt;I was wondering if someone has an answer as to why the arcpy.Describe(lyr).FIDSet method returns an empty string if the lyr object happens to reside in a group layer as opposed to the root of the map contents?&lt;/P&gt;&lt;P&gt;given a layer named "STREETS," if the layer is in the root, the following correctly returns the selected objectIDs&lt;BR /&gt;&lt;BR /&gt;lyr = mp.listLayers('STREETS')[0]&lt;/P&gt;&lt;P&gt;arcpy.Describe(lyr).FIDSet&lt;/P&gt;&lt;P&gt;returns&amp;nbsp;'78878180; 78879544; 78930438'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if 'STREETS' is in a group layer 'BaseMap' the lyr is returned fine but the FIDSet method returns an empty string. To successfully return the selected objects I need to pass lyr.longName. Why does the selection not seem to exist for the object the same way the layer's location string does?&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jul 2024 14:55:27 GMT</pubDate>
    <dc:creator>Glasnoct</dc:creator>
    <dc:date>2024-07-31T14:55:27Z</dc:date>
    <item>
      <title>FIDSet method returns empty if layer object is in a group layer</title>
      <link>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1512975#M71163</link>
      <description>&lt;P&gt;I was wondering if someone has an answer as to why the arcpy.Describe(lyr).FIDSet method returns an empty string if the lyr object happens to reside in a group layer as opposed to the root of the map contents?&lt;/P&gt;&lt;P&gt;given a layer named "STREETS," if the layer is in the root, the following correctly returns the selected objectIDs&lt;BR /&gt;&lt;BR /&gt;lyr = mp.listLayers('STREETS')[0]&lt;/P&gt;&lt;P&gt;arcpy.Describe(lyr).FIDSet&lt;/P&gt;&lt;P&gt;returns&amp;nbsp;'78878180; 78879544; 78930438'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if 'STREETS' is in a group layer 'BaseMap' the lyr is returned fine but the FIDSet method returns an empty string. To successfully return the selected objects I need to pass lyr.longName. Why does the selection not seem to exist for the object the same way the layer's location string does?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 14:55:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1512975#M71163</guid>
      <dc:creator>Glasnoct</dc:creator>
      <dc:date>2024-07-31T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: FIDSet method returns empty if layer object is in a group layer</title>
      <link>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1513039#M71166</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/layer-properties.htm" target="_blank"&gt;Layer properties—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There are differences in arcpy.Describe and arcpy.da.Describe as noted in the help topic.&amp;nbsp; Is there a reason that you are using the former?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 16:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1513039#M71166</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-07-31T16:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: FIDSet method returns empty if layer object is in a group layer</title>
      <link>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1513074#M71170</link>
      <description>&lt;P&gt;Just habit; likely have been running with the former due to its use in examples I found at one point.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;the difference between the two in the documentation just says one returns a string and the other a list and both result in the same discrepancy in the FIDset value. I looked through the documentation some more but see nowhere that explains why the FIDSet disappears once the layer is moved into a group layer even if the exact same layer object is supplied to Describe.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 17:44:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1513074#M71170</guid>
      <dc:creator>Glasnoct</dc:creator>
      <dc:date>2024-07-31T17:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: FIDSet method returns empty if layer object is in a group layer</title>
      <link>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1513222#M71172</link>
      <description>&lt;P&gt;I don't work with these types of situations, but the isGroupLayer and longName seem to be the way as you describe as in the Discussion section here&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layer-class.htm" target="_blank"&gt;Layer—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 20:43:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fidset-method-returns-empty-if-layer-object-is-in/m-p/1513222#M71172</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-07-31T20:43:21Z</dc:date>
    </item>
  </channel>
</rss>

