<?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 Hide or remove a GPFeatureRecordSetLayer layer using python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1363149#M69457</link>
    <description>&lt;P&gt;I'm building a&amp;nbsp;geoprocessing tool with a "Feature Set" input (GPFeatureRecordSetLayer) that will be used during the tool's execution. The result of the execution is a new layer with color indications that should be presented on top of the "Feature Set" for the user.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Any idea how to remove/hide the initial&amp;nbsp; "Feature Set" layer from the Python side? or maybe update that input layer to be in the bottom of the map.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I've tried to use the "arcpy.Delete_management(desc.name)" that was able to delete the layer, but also caused ArcGIS Pro to throw endless errors.&lt;BR /&gt;&lt;BR /&gt;Another question that might help is:&lt;BR /&gt;Where is that input layer stored? is it possible to access that using "arcpy.mapping.MapDocument" maybe...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 17:35:28 GMT</pubDate>
    <dc:creator>TomerAdmon</dc:creator>
    <dc:date>2023-12-20T17:35:28Z</dc:date>
    <item>
      <title>Hide or remove a GPFeatureRecordSetLayer layer using python</title>
      <link>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1363149#M69457</link>
      <description>&lt;P&gt;I'm building a&amp;nbsp;geoprocessing tool with a "Feature Set" input (GPFeatureRecordSetLayer) that will be used during the tool's execution. The result of the execution is a new layer with color indications that should be presented on top of the "Feature Set" for the user.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Any idea how to remove/hide the initial&amp;nbsp; "Feature Set" layer from the Python side? or maybe update that input layer to be in the bottom of the map.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I've tried to use the "arcpy.Delete_management(desc.name)" that was able to delete the layer, but also caused ArcGIS Pro to throw endless errors.&lt;BR /&gt;&lt;BR /&gt;Another question that might help is:&lt;BR /&gt;Where is that input layer stored? is it possible to access that using "arcpy.mapping.MapDocument" maybe...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 17:35:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1363149#M69457</guid>
      <dc:creator>TomerAdmon</dc:creator>
      <dc:date>2023-12-20T17:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hide or remove a GPFeatureRecordSetLayer layer using python</title>
      <link>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1363158#M69458</link>
      <description>&lt;P&gt;If you're trying to remove the layer, you want to be using the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/map-class.htm#:~:text=from%20a%20map.-,removeLayer%20(remove_layer),-Provides%20the%20ability" target="_blank" rel="noopener"&gt;removelayer method of the map class&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.activeMap

mp.removeLayer("Featureset1")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A layer is not actually your data; it is just a representation of it. arcpy.management.Delete() is killing whatever data that layer is referencing.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 17:56:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1363158#M69458</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-20T17:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hide or remove a GPFeatureRecordSetLayer layer using python</title>
      <link>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1364247#M69481</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875"&gt;@AlfredBaldenweck&lt;/a&gt;&amp;nbsp;!!&lt;BR /&gt;Would that work if the Python script is executed from a geoprocessing widget in webappbuilder? or should I look for an alternative?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 08:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1364247#M69481</guid>
      <dc:creator>TomerAdmon</dc:creator>
      <dc:date>2023-12-25T08:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hide or remove a GPFeatureRecordSetLayer layer using python</title>
      <link>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1364305#M69483</link>
      <description>&lt;P&gt;Actually not sure at all about this one. I'd say give it a try and then if it doesn't work, try &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html#webmap:~:text=.content)-,remove_layer(layer),-%C2%B6" target="_blank" rel="noopener"&gt;the webmap RemoveLayer() method&lt;/A&gt;. If it's in a webapp, I'm assuming you're using web maps, as well, so that might be the way to go anyway?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2023 14:33:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hide-or-remove-a-gpfeaturerecordsetlayer-layer/m-p/1364305#M69483</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-26T14:33:33Z</dc:date>
    </item>
  </channel>
</rss>

