<?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: ESRI model builder iterations and clipping in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780047#M3229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have the your model mostly set up correctly as you depicted it above.&amp;nbsp; Most of the advice I posted is irrelevant if this is the case, since the model will not need to be as complex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One suggested change - assuming you don't need multiple copies of the Original.shp, you can skip the Copy Features part and instead use the Original.shp as a direct input to the Clip, since it is constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it doesn't work, post what the error is (if any) and/or how far it got before it stopped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another issue to check would be the presence of other types of files in the Iterated folder besides shapefiles, as they may trigger an error as the model tries to Clip them.&amp;nbsp; These can often filtered out (without having to remove them) by setting the&amp;nbsp; the Iterate Feature Classes "Feature Type" to "Polygon."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2014 22:53:01 GMT</pubDate>
    <dc:creator>ChrisDonohue__GISP</dc:creator>
    <dc:date>2014-11-10T22:53:01Z</dc:date>
    <item>
      <title>ESRI model builder iterations and clipping</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780043#M3225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to build an ESRI model which makes a copy of a file in "folder A"&amp;nbsp; everytime it iterates over an individual file in "folder B". Then it clips the copied file&amp;nbsp; with the iterated file in "folder b".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get it do iterate over a set of files but am having trouble with making a copy and clipping that copy over each iteration. Can anyone give me some direction as to go about this? I have tried using sub models but not sure that is the way to go. Is this something better accomplished through Python scripting?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 18:38:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780043#M3225</guid>
      <dc:creator>RyanRobinson1</dc:creator>
      <dc:date>2014-11-10T18:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI model builder iterations and clipping</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780044#M3226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few questions to help clarify what you are trying to do/troubleshoot/brainstorm.&amp;nbsp; I haven't seen your model/code, so these are stabs in the dark, but may offer some insight:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Is an "in-line variable substitution" being used to point to the appropriate file to be copied in folder A?&amp;nbsp; This is a potential way to extract the file name from the iterated file for use in the Copy process, assuming that is how your iteration is set up (i.e. the file names are an attribute in the file you are iterating).&amp;nbsp; &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Examples_of_inline_model_variable_substitution/002w0000005w000000/"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#/Examples_of_inline_model_variable_substitution/002w0000005w000000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Is the intent to only get a clipped result - i.e. do you need to retain the copy made before it was clipped?&amp;nbsp; I ask as there can sometimes be issues where the data used in the process - the "intermediate data" - is not being created as expected and thus unavailable for the following processes (Clip).&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Making_intermediate_data_managed_data/002w0000005p000000/"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#/Making_intermediate_data_managed_data/002w0000005p000000/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One can also make the intermediate data Parameters to force the saving:&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Preserving_intermediate_data/002w0000003m000000/"&gt;http://resources.arcgis.com/en/help/main/10.2/index.html#/Preserving_intermediate_data/002w0000003m000000/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 19:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780044#M3226</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2014-11-10T19:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI model builder iterations and clipping</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780045#M3227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some more ideas.&amp;nbsp; I put together a quick model of what I think you are trying to do (but without knowing the particulars):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(please see attached jpg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Iterate_CopyFC_Clip__TEST.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/29095_Iterate_CopyFC_Clip__TEST.jpg" style="width: 620px; height: 278px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; You may need a Precondition set for the Feature Class to Feature Class to activate correctly.&amp;nbsp; Set the Precondition for "Name".&amp;nbsp; A dotted line will show up connecting Name to the FC to FC.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; If it runs the Feature Class to Feature Class but does not save the results, consider making the Output Feature Classes Parameters (as in jpg) to ensure it saves&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Major potential issue - you may end up with an "infinite loop" as the process copies a file from Folder A to Folder B, but then continues Iterating Folder B based on the files that are there (which the process continues to add).&amp;nbsp; If this occurs, a workaround would be to make 2 submodels:&lt;/P&gt;&lt;P&gt;- Submodel for Copy.&amp;nbsp; The initial Iterate Features and Feature Class to Feature Class, but modified to copy the files to another location besides Folders A or B (let's call it Folder C), &lt;/P&gt;&lt;P&gt;- Submodel for the Clip part, where an iteration occurs (Iterate Feature Classes) on Folder C to clip the files, with the results going back to the final location desired.&lt;/P&gt;&lt;P&gt;-Then a model to connect the two submodels, with a Precondition set to have the Clip submodel activate after the Copy submodel is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 21:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780045#M3227</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2014-11-10T21:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI model builder iterations and clipping</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780046#M3228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im going to take a look at what you suggested. The attached image is what I have as a rough draft of what im trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically need to make a copy of the "Original" file for the first file in "Folder A", clip that copy with the first file and then move to the next file in "Folder A", make another copy of "Original" and repeat the process until it iterates over all files in "Folder A".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inputs would be:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folder A&lt;/P&gt;&lt;P&gt;file1.shp&lt;/P&gt;&lt;P&gt;file2.shp&lt;/P&gt;&lt;P&gt;file3.shp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folder B&lt;/P&gt;&lt;P&gt;"Original.shp" (File to be copied and clipped)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output would be:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Folder B)&lt;/P&gt;&lt;P&gt;Copy of Original_file1_clipped&lt;/P&gt;&lt;P&gt;Copy of Original_file2_clipped&lt;/P&gt;&lt;P&gt;Copy of Original_file3_clipped&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="model.JPG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/29097_model.JPG" style="width: 620px; height: 393px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 22:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780046#M3228</guid>
      <dc:creator>RyanRobinson1</dc:creator>
      <dc:date>2014-11-10T22:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI model builder iterations and clipping</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780047#M3229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have the your model mostly set up correctly as you depicted it above.&amp;nbsp; Most of the advice I posted is irrelevant if this is the case, since the model will not need to be as complex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One suggested change - assuming you don't need multiple copies of the Original.shp, you can skip the Copy Features part and instead use the Original.shp as a direct input to the Clip, since it is constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it doesn't work, post what the error is (if any) and/or how far it got before it stopped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another issue to check would be the presence of other types of files in the Iterated folder besides shapefiles, as they may trigger an error as the model tries to Clip them.&amp;nbsp; These can often filtered out (without having to remove them) by setting the&amp;nbsp; the Iterate Feature Classes "Feature Type" to "Polygon."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 22:53:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780047#M3229</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2014-11-10T22:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI model builder iterations and clipping</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780048#M3230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris. For some reason, I was stuck on the idea that I need to make a copy since that is how I did it in another GIS program. I appreciate the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 23:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/esri-model-builder-iterations-and-clipping/m-p/780048#M3230</guid>
      <dc:creator>RyanRobinson1</dc:creator>
      <dc:date>2014-11-10T23:04:29Z</dc:date>
    </item>
  </channel>
</rss>

