<?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: How can I catch a return Value from “Calculate Value” to start another Tool in ArcGis Model builder? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185210#M6275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than going to great lengths to check for all possible things that can go wrong, or provide options as you go, wouldn't it be easier to &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ensure that the output from one section to the other is the required type by setting it as the output default&lt;/LI&gt;&lt;LI&gt;if certain requirements are required at the start of the process do the limit checking script there&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This might make the flow easier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Apr 2016 20:08:39 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-04-08T20:08:39Z</dc:date>
    <item>
      <title>How can I catch a return Value from “Calculate Value” to start another Tool in ArcGis Model builder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185209#M6274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey I have troubles with If/else statements in ArcGis Modelbulider. I have imported TauDEM Toolbox to work with D-infinity algorythm. Since D-Infinity only works with .tif raster files&lt;/P&gt;&lt;P&gt;I wanted to check first if the input raster is an .tif raster. After checking i want to start either D-infinity if the return value is true. If its not i want to convert it.&lt;/P&gt;&lt;P&gt;For that i tried to use the "Calculate Value" Tool with that code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;check_if_Tiff("%DGM%")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Codeblock:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def check_if_Tiff(DGM):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(DGM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; type = desc.format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if type == "TIFF":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "true"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "false"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so far so good but i dont know how to catch the return values to use them in another tool. I also dont understand what for is the tool "Merge Branch" cause i only get one return value&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I read this documentation &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fblogs.esri.com%2Fesri%2Farcgis%2F2011%2F06%2F06%2Fmodelbuilderifthenelse1%2F" rel="nofollow" target="_blank"&gt;https://blogs.esri.com/esri/arcgis/2011/06/06/modelbuilderifthenelse1/&lt;/A&gt;&lt;SPAN&gt; but i cant completely follow it. Do I have to do this with an python script or is there a way &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;like I am trying?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 19:39:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185209#M6274</guid>
      <dc:creator>MaxWeissenborn</dc:creator>
      <dc:date>2016-04-08T19:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I catch a return Value from “Calculate Value” to start another Tool in ArcGis Model builder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185210#M6275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than going to great lengths to check for all possible things that can go wrong, or provide options as you go, wouldn't it be easier to &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ensure that the output from one section to the other is the required type by setting it as the output default&lt;/LI&gt;&lt;LI&gt;if certain requirements are required at the start of the process do the limit checking script there&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This might make the flow easier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 20:08:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185210#M6275</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-08T20:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I catch a return Value from “Calculate Value” to start another Tool in ArcGis Model builder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185211#M6276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ModelBuilder doesn't provide a functionality to implement if-then-else logic out of the box. You would have to leverage python to implement this, but there are several approaches you can take. Try taking a look at the following page to see if this may be easier for you to implement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/using-if-then-else-logic-for-branching.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/using-if-then-else-logic-for-branching.htm"&gt;Using If-Then-Else logic for branching—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 20:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-catch-a-return-value-from-calculate/m-p/185211#M6276</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2016-04-08T20:25:51Z</dc:date>
    </item>
  </channel>
</rss>

