<?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: Using output from script tool as input to common tools in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1323259#M3869</link>
    <description>&lt;P&gt;you need to add an output (direction) parameter and Set() it to the output that you are creating in the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 00:33:43 GMT</pubDate>
    <dc:creator>ShitijMehta</dc:creator>
    <dc:date>2023-08-29T00:33:43Z</dc:date>
    <item>
      <title>Using output from script tool as input to common tools</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318784#M3864</link>
      <description>&lt;P&gt;Part of a model I am building uses a tool that I scripted (which is supposed to be a simple export feature class from sde connection to a local gdb for processing) and I'd like to use the output featureclass from that tool as the input to the next common tool in the model. I have read at least a dozen solutions to this same problem from other folks on here over and over but I can not seem to apply the solutions to my specific instance. I am &lt;U&gt;&lt;STRONG&gt;NOT&lt;/STRONG&gt;&lt;/U&gt; a programmer so this script was thrown together also using examples from around the community.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here is the piece of the model that I need to connect-&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AngelaStrongarm_0-1692117327167.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78123iE1547699B01ED03F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AngelaStrongarm_0-1692117327167.png" alt="AngelaStrongarm_0-1692117327167.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;with ConnectandExport being the scripted tool (which works as a standalone script) *I cut off the sde connection parameters in the screenshot but they are valid and the connection succeeds every time)*&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AngelaStrongarm_1-1692117485976.png" style="width: 777px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78124iCCE9F0C0719A5E10/image-dimensions/777x339?v=v2" width="777" height="339" role="button" title="AngelaStrongarm_1-1692117485976.png" alt="AngelaStrongarm_1-1692117485976.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 16:48:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318784#M3864</guid>
      <dc:creator>AngelaStrongarm</dc:creator>
      <dc:date>2023-08-15T16:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using output from script tool as input to common tools</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318840#M3865</link>
      <description>&lt;P&gt;If you add a script tool to a model it should show up as a rectangle, just like the normal tools. Your screenshot is highlighting a variable, try dragging the script tool from the catalog into the ModelBuilder canvas and see if that gives you a more sensible item to work with.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 18:56:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318840#M3865</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2023-08-15T18:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using output from script tool as input to common tools</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318860#M3866</link>
      <description>&lt;P&gt;Thank you for this - seems like an obvious thing that I skipped over, but then how do I call the exported FC from that tool? For ex:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AngelaStrongarm_0-1692128079101.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78142iC117E58D468E89CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AngelaStrongarm_0-1692128079101.png" alt="AngelaStrongarm_0-1692128079101.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to use the export from this tool as the input for the next tool.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 19:34:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318860#M3866</guid>
      <dc:creator>AngelaStrongarm</dc:creator>
      <dc:date>2023-08-15T19:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using output from script tool as input to common tools</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318873#M3867</link>
      <description>&lt;P&gt;What do your tool parameters look like when you defined the tool in Pro? Your script has 2 inputs and 1 output, these same inputs and outputs must be defined in the tool's structure. The docs can explain this better than I can: &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/setting-script-tool-parameters.htm" target="_blank" rel="noopener"&gt;link&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;In your case I think you can eliminate both inputs as everything is hardcoded into the script, or you can turn some of the inputs into parameters to make your tool more flexible, up to you. The output parameter will have to be a Derived Output as you're creating the feature class wholly within the script, if this causes issues you can let the user pick the output FC as a Required Output parameter instead.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 19:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1318873#M3867</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2023-08-15T19:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using output from script tool as input to common tools</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1323258#M3868</link>
      <description>&lt;P&gt;What is the data type of the ConnectedEx or the output that you are trying to connect to the make feature layer tool?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 00:32:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1323258#M3868</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2023-08-29T00:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using output from script tool as input to common tools</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1323259#M3869</link>
      <description>&lt;P&gt;you need to add an output (direction) parameter and Set() it to the output that you are creating in the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 00:33:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/using-output-from-script-tool-as-input-to-common/m-p/1323259#M3869</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2023-08-29T00:33:43Z</dc:date>
    </item>
  </channel>
</rss>

