<?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: Is there a way to continue an iteration if an input fails? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277711#M9569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! There was no particular reason I went with a shapefile versus a feature class. I just learned about the size allowances today from a coworker and I think that will help fix a lot of the problems. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you set up a batch run with GIS? I've only done it before with just a shell script. My "final" model is needs to be something anyone can run through the tool interface in GIS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Dec 2014 14:32:19 GMT</pubDate>
    <dc:creator>JenniferRoath</dc:creator>
    <dc:date>2014-12-31T14:32:19Z</dc:date>
    <item>
      <title>Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277705#M9563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote a model to process a large number of rasters. It asks for an input folder and it will iterate through each raster to perform the steps. Some of the raster outputs are very large, and I will occasionally get an error and stop the whole model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is screen shot of my model. It will only fail at:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (1) the &lt;EM&gt;"raster to polygon"&lt;/EM&gt; step for shapefile exceeding 2GB limit or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (2) the &lt;EM&gt;"dissolve"&lt;/EM&gt; step for lack of memory. (Note: &lt;SPAN style="text-decoration: underline;"&gt;none of the data is 'intermediate'&lt;/SPAN&gt; because of the memory issues, the dissolve polygon can just be extremely large with over 3 million features)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am looking for &lt;SPAN style="text-decoration: underline;"&gt;A WAY TO KEEP THE MODEL RUNNING&lt;/SPAN&gt;. If a step fails, is there a way that I can keep the iteration going and move on to the next raster? It takes ~3hours to process each raster and I need to be able to run this overnight and on the weekends. If it fails on the first raster, I'm loosing too much of my processing time so I want it to at least keep running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: If you have ideas on eliminating the failures altogether, that would be helpful too! I have almost 300 of these to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 18:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277705#M9563</guid>
      <dc:creator>JenniferRoath</dc:creator>
      <dc:date>2014-12-30T18:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277706#M9564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure how to do this in ModelBuilder, but you could export your model to Python and add in some error handling there. One thing to try would be to test for file size and number of features and skip those that are too big (using if-then statements). Another thing to do if you don't want to test for size first, is to use a try-except statement. You'd have a "for" loop to pass through all your data and then inside that would be a "try" and an "except" to catch the errors with a "continue" under "except" to let the model know it can skip on to the next item in the "for" loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 19:08:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277706#M9564</guid>
      <dc:creator>BondHarper</dc:creator>
      <dc:date>2014-12-30T19:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277707#M9565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wrap your Raster to Polygon and Dissolve steps into a Calculate Value python code block and use a try/except block.&amp;nbsp; Alternatively you can integrate a script tool built from those GP tools.&amp;nbsp; You may want to add an output boolean as a precondition to the dissolve so it doesn't run on empty polygon output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 19:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277707#M9565</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2014-12-30T19:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277708#M9566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The desired format is a model so that it can be easily used by others or modified later. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I like the idea of integrating a script into the model. I'm just not as familiar with doing it that way (I either write the whole script myself or make a model, I'm still learning how to do them together) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do either or you have example scripts of your suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to wait until there's an error and tell the model to just move on to the next? Or do I have to predict what all the errors might be an write something to catch them all? Basically my task is 2 fold 1) process 300 rasters and 2) have a robust model that can be rerun later without any errors&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 20:47:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277708#M9566</guid>
      <dc:creator>JenniferRoath</dc:creator>
      <dc:date>2014-12-30T20:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277709#M9567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Integrating a script into a model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/integrating-scripts-within-a-model.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/integrating-scripts-within-a-model.htm"&gt;Integrating scripts within a model—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way to make the script is to copy a Python snippet from a Result made manually, then edit it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Calculate Value is a bit more basic, the thing to watch is to protect path inputs using raw text for the variable value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r"%MyPathVariable%"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will stop Python interpreting some escape characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 20:57:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277709#M9567</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2014-12-30T20:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277710#M9568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iterators are really convenient but has this limitation as you have encountered. You can of course go around the limitation by scripting or you can also remove the iterator in your model and then batch run it. As&amp;nbsp; far as I can remember, failed runs will not hold everything else back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any particular reason why you want to write the %val%_poly to a shapefile instead of into a feature class in an fgdb. your 2gb limit will disappear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes for the New Year!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 23:07:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277710#M9568</guid>
      <dc:creator>MikeCusi</dc:creator>
      <dc:date>2014-12-30T23:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277711#M9569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! There was no particular reason I went with a shapefile versus a feature class. I just learned about the size allowances today from a coworker and I think that will help fix a lot of the problems. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you set up a batch run with GIS? I've only done it before with just a shell script. My "final" model is needs to be something anyone can run through the tool interface in GIS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Dec 2014 14:32:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277711#M9569</guid>
      <dc:creator>JenniferRoath</dc:creator>
      <dc:date>2014-12-31T14:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277712#M9570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After you've created the model (minus the iterator) right click on it and select Batch....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 00:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277712#M9570</guid>
      <dc:creator>MikeCusi</dc:creator>
      <dc:date>2015-01-02T00:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to continue an iteration if an input fails?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277713#M9571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! My final product needs to be user friendly and the batch won't work for that. But I will definitely use it when I'm processing on my own from now on. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 23:05:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-way-to-continue-an-iteration-if-an/m-p/277713#M9571</guid>
      <dc:creator>JenniferRoath</dc:creator>
      <dc:date>2015-01-05T23:05:56Z</dc:date>
    </item>
  </channel>
</rss>

