<?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 GP Tool SL Builder - User-drawn selection poly FeatureSet persists when tool closed in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/gp-tool-sl-builder-user-drawn-selection-poly/m-p/247860#M8511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a published GP script which was written in a Python Toolbox and results were published as GP Service in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My script is simple - User draws a polygon to select features in a point layer.&amp;nbsp; User-defined selection polygon is set as an input parameter, type FeatureSet, schema set to polygon shapefile.&amp;nbsp; The selected feature attributes are exported to a CSV file for the user.&amp;nbsp; The GP Task itself works exactly as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem:&amp;nbsp; The graphic created in the Silverlight Builder app when the user draws a selection polygon persists on the screen and is added as a new layer to the Map Contents window in the Silverlight Builder.&amp;nbsp; These will not go away until you close the app and reopen.&amp;nbsp; This is not expected behavior.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what I have already tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Set Geoprocessing Options in ArcMap before I run the tool and publish the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Add results of geoprocessing operations to the display is turned OFF.&amp;nbsp; In ArcMap the selection poly never appears in the TOC.[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Results are temporary by default is ON, but result is the same if it is turned off.[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; arcpy.addOutputsToMap=False is set in my Python code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Every feature layer, feature set parameter, anything temp in the code is deleted in Python with arcpy.Delete_management at the end of the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm confused as to why the graphic and the layer in the Map Contents window don't disappear when the tool is closed.&amp;nbsp; In addition, if you run the tool again you will get a second persistent graphic, and a second layer added to the Map Contents window, and so on as many times as you want to run the tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There appears to be no option in the GP task configuration in the SL Builder to add or not add the user-defined poly to the Map Contents window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not have the option to fool with the back-end Silverlight code, this all has to be managed through the GP task with Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I might be doing wrong?&amp;nbsp; Picture of SL Builder attached to show the multiple graphics and added map layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]29341[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tami&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Nov 2013 20:30:43 GMT</pubDate>
    <dc:creator>TamiOnstad</dc:creator>
    <dc:date>2013-11-25T20:30:43Z</dc:date>
    <item>
      <title>GP Tool SL Builder - User-drawn selection poly FeatureSet persists when tool closed</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/gp-tool-sl-builder-user-drawn-selection-poly/m-p/247860#M8511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a published GP script which was written in a Python Toolbox and results were published as GP Service in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My script is simple - User draws a polygon to select features in a point layer.&amp;nbsp; User-defined selection polygon is set as an input parameter, type FeatureSet, schema set to polygon shapefile.&amp;nbsp; The selected feature attributes are exported to a CSV file for the user.&amp;nbsp; The GP Task itself works exactly as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem:&amp;nbsp; The graphic created in the Silverlight Builder app when the user draws a selection polygon persists on the screen and is added as a new layer to the Map Contents window in the Silverlight Builder.&amp;nbsp; These will not go away until you close the app and reopen.&amp;nbsp; This is not expected behavior.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what I have already tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Set Geoprocessing Options in ArcMap before I run the tool and publish the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Add results of geoprocessing operations to the display is turned OFF.&amp;nbsp; In ArcMap the selection poly never appears in the TOC.[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Results are temporary by default is ON, but result is the same if it is turned off.[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; arcpy.addOutputsToMap=False is set in my Python code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Every feature layer, feature set parameter, anything temp in the code is deleted in Python with arcpy.Delete_management at the end of the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm confused as to why the graphic and the layer in the Map Contents window don't disappear when the tool is closed.&amp;nbsp; In addition, if you run the tool again you will get a second persistent graphic, and a second layer added to the Map Contents window, and so on as many times as you want to run the tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There appears to be no option in the GP task configuration in the SL Builder to add or not add the user-defined poly to the Map Contents window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not have the option to fool with the back-end Silverlight code, this all has to be managed through the GP task with Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I might be doing wrong?&amp;nbsp; Picture of SL Builder attached to show the multiple graphics and added map layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]29341[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tami&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 20:30:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/gp-tool-sl-builder-user-drawn-selection-poly/m-p/247860#M8511</guid>
      <dc:creator>TamiOnstad</dc:creator>
      <dc:date>2013-11-25T20:30:43Z</dc:date>
    </item>
  </channel>
</rss>

