<?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: Skipping model branches that do not have data in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812409#M3702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand, ArcPy function Exists can be inserted by Calculate Value tool inside model. I did it by using this &lt;A href="https://blogs.esri.com/esri/arcgis/2011/06/06/modelbuilderifthenelse1/" title="https://blogs.esri.com/esri/arcgis/2011/06/06/modelbuilderifthenelse1/"&gt;If you are stuck at "if" – Part 1 | ArcGIS Blog&lt;/A&gt; (Example 3) as an example. However, I still need to learn a lot about ArcPy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2016 06:35:03 GMT</pubDate>
    <dc:creator>MantasButrimavičius1</dc:creator>
    <dc:date>2016-02-19T06:35:03Z</dc:date>
    <item>
      <title>Skipping model branches that do not have data</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812407#M3700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to ask if you know how could I prevent my model from attempting to run model branches that do not have data. &lt;/P&gt;&lt;P&gt;For the record, the purpose of this model is to clip specific data from given database and convert it to shapefiles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="model_picture.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/184940_model_picture.PNG" style="width: 620px; height: 677px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;As you can see above, I have 4 independent branches that uses 3 same parameters: Database (from which data comes), Area (as a clip input) and Folder (where shapefiles are generated in). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;Unfortunately, the problem is that required data is stored in several databases and it migrates from one database to another. So, I have to run this model for several databases to collect all shapefiles that I need. However, I obviously cannot do this because if even one branch does not get any data (in the "Make feature layer" step) whole model does not work and I get the error that some data is missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;I would like to insert some tool that checks if required data exists in database or not. If it does not exist, that branch gives nothing and continues to another branch. In this scenario I could collect some shapefiles from one database, then change the database, re-run the model and collect rest of the shapefiles.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;Could you please suggest some tools to do what I need. I have already tried to use if/else by Calculate Value tool but I am new to Python, so a little help would not mind at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.5pt; font-family: Helvetica, sans-serif;"&gt;Thank you in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 16:32:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812407#M3700</guid>
      <dc:creator>MantasButrimavičius1</dc:creator>
      <dc:date>2016-02-18T16:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Skipping model branches that do not have data</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812408#M3701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/exists.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/exists.htm"&gt;Exists—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;is the only thing i can suggests... but it would entail a script in the model&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 17:43:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812408#M3701</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-18T17:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Skipping model branches that do not have data</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812409#M3702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand, ArcPy function Exists can be inserted by Calculate Value tool inside model. I did it by using this &lt;A href="https://blogs.esri.com/esri/arcgis/2011/06/06/modelbuilderifthenelse1/" title="https://blogs.esri.com/esri/arcgis/2011/06/06/modelbuilderifthenelse1/"&gt;If you are stuck at "if" – Part 1 | ArcGIS Blog&lt;/A&gt; (Example 3) as an example. However, I still need to learn a lot about ArcPy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 06:35:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/skipping-model-branches-that-do-not-have-data/m-p/812409#M3702</guid>
      <dc:creator>MantasButrimavičius1</dc:creator>
      <dc:date>2016-02-19T06:35:03Z</dc:date>
    </item>
  </channel>
</rss>

