<?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 script tool geoprocessing output NOT displayed to arcmap in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738538#M57140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a simpler workaround instead of arcpy.mapping modules to get the output from geoprocessing to display to arcmap when running a script tool?&amp;nbsp; I am in arcmap with geoprocessing option checked on to add geoprocessing results to display...which it does in the Python window, but not using a script tool.. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inFC = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inFC,"Test_Layer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;works, but does not return a "Test_Layer" to the data frame or table of contents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;running in the Python window, it works fine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inFC = r'c:\test\Points.shp'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inFC,"Test_Layer")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Feb 2011 00:00:42 GMT</pubDate>
    <dc:creator>DaveVerbyla</dc:creator>
    <dc:date>2011-02-19T00:00:42Z</dc:date>
    <item>
      <title>script tool geoprocessing output NOT displayed to arcmap</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738538#M57140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a simpler workaround instead of arcpy.mapping modules to get the output from geoprocessing to display to arcmap when running a script tool?&amp;nbsp; I am in arcmap with geoprocessing option checked on to add geoprocessing results to display...which it does in the Python window, but not using a script tool.. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inFC = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inFC,"Test_Layer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;works, but does not return a "Test_Layer" to the data frame or table of contents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;running in the Python window, it works fine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inFC = r'c:\test\Points.shp'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inFC,"Test_Layer")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Feb 2011 00:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738538#M57140</guid>
      <dc:creator>DaveVerbyla</dc:creator>
      <dc:date>2011-02-19T00:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: script tool geoprocessing output NOT displayed to arcmap</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738539#M57141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;are you running the tool from within arctoolbox?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Feb 2011 12:59:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738539#M57141</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-02-19T12:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: script tool geoprocessing output NOT displayed to arcmap</title>
      <link>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738540#M57142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, the following will work for you. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your script will be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inLayer = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outLayer = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inLayer,outLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameterAsText(1,outLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now go through the wizard for adding the script to a toolbox. When you get to the Parameters page of the wizard you need to set your output layer as an Output using the Direction property (see the attached screengrab). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Marie Hogan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 20:06:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-tool-geoprocessing-output-not-displayed-to/m-p/738540#M57142</guid>
      <dc:creator>MarieHogan</dc:creator>
      <dc:date>2011-02-27T20:06:21Z</dc:date>
    </item>
  </channel>
</rss>

