<?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 Modelbuilder: Collect values in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23298#M796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a large model with submodels.&lt;/P&gt;&lt;P&gt;Basically the Model iterates through all Districts, selects in each district an attribute above a certain threshold, creates a layerfile of it. The submodel iterates through all the Attributes of the created layerfile and then selects the neighbor of this attribute below a certain threshold and creates another layerfile of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end I want to merge the layerfiles. I though of using a collect value tool to collect all the layerfiles (red circle) which got created in the iterations in the submodel and then add a Merge tool to it in the main model ( or should it be in the submodel)? However, I get no result if I add it to display.&lt;/P&gt;&lt;P&gt;The whole Model works if I just run it and see the result for the last run in the iterator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this? I attached the model but the jpeg probably doesn't make any sense as the text is too small.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Crossposted on Stackexchange: &lt;A href="http://gis.stackexchange.com/questions/193965/modelbuilder-arcgis-collect-values" title="http://gis.stackexchange.com/questions/193965/modelbuilder-arcgis-collect-values"&gt;Modelbuilder ArcGIS: Collect values - Geographic Information Systems Stack Exchange&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainmodel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="201196" alt="Mainmodel.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/201196_Mainmodel.jpg" style="width: 802px; height: 151px;" /&gt;&lt;/P&gt;&lt;P&gt;Submodel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="201221" alt="submodel.jpg" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/201221_submodel.jpg" style="width: 799px; height: 352px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2016 05:13:11 GMT</pubDate>
    <dc:creator>PV</dc:creator>
    <dc:date>2016-05-18T05:13:11Z</dc:date>
    <item>
      <title>Modelbuilder: Collect values</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23298#M796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a large model with submodels.&lt;/P&gt;&lt;P&gt;Basically the Model iterates through all Districts, selects in each district an attribute above a certain threshold, creates a layerfile of it. The submodel iterates through all the Attributes of the created layerfile and then selects the neighbor of this attribute below a certain threshold and creates another layerfile of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end I want to merge the layerfiles. I though of using a collect value tool to collect all the layerfiles (red circle) which got created in the iterations in the submodel and then add a Merge tool to it in the main model ( or should it be in the submodel)? However, I get no result if I add it to display.&lt;/P&gt;&lt;P&gt;The whole Model works if I just run it and see the result for the last run in the iterator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this? I attached the model but the jpeg probably doesn't make any sense as the text is too small.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Crossposted on Stackexchange: &lt;A href="http://gis.stackexchange.com/questions/193965/modelbuilder-arcgis-collect-values" title="http://gis.stackexchange.com/questions/193965/modelbuilder-arcgis-collect-values"&gt;Modelbuilder ArcGIS: Collect values - Geographic Information Systems Stack Exchange&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainmodel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="201196" alt="Mainmodel.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/201196_Mainmodel.jpg" style="width: 802px; height: 151px;" /&gt;&lt;/P&gt;&lt;P&gt;Submodel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="201221" alt="submodel.jpg" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/201221_submodel.jpg" style="width: 799px; height: 352px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 05:13:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23298#M796</guid>
      <dc:creator>PV</dc:creator>
      <dc:date>2016-05-18T05:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder: Collect values</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23299#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you naming the layer files uniquely be using the run number --&amp;nbsp; &lt;STRONG&gt;layer%n%&amp;nbsp; &lt;/STRONG&gt;?&amp;nbsp; If you don't do that the layer just gets overwritten over and over again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a little confused as I don't see why you have two inputs to the Collect Values tool. Normally you would only have one, and each iteration would add one to the stack. You don't have a precondition to control flow of execution so I your flow of control is kind of strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend attaching your tbx - then we can open it up and really see what's going on instead of guessing from your screen shots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The merge should be in the main model. See the example in the help here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/integrating-model-within-a-model.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/integrating-model-within-a-model.htm"&gt;Integrating a model within a model—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 05:28:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23299#M797</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2016-05-18T05:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder: Collect values</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23300#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to name it like you suggest above, but I probably did it wrong as it does not work.. &lt;BR /&gt;The toolbox is now attached in the question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want all the inputs into the collector to merge after they pass the tool. The Inputs are from different layerfiles. I attached the toolbox where I use an append first now, however this causes a "read-only" error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why I should use a precondition? As I understand from &lt;A href="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/using-preconditions.htm" title="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/using-preconditions.htm"&gt;Preconditions—ArcGIS Pro | ArcGIS for Desktop&lt;/A&gt; , a precondition is only used if you have disconnected processes - which is not the case in my model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 07:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23300#M798</guid>
      <dc:creator>PV</dc:creator>
      <dc:date>2016-05-18T07:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder: Collect values</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23301#M799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Layers are dynamic and point to datasets, they are not data sets themselves. I think your approach of trying to work entirely with layers is getting you into trouble -- it would make a lot more sense to create temporary feature classes and put them into the collector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggested a precondition because I misinterpreted your cut-off graphic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 03:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/modelbuilder-collect-values/m-p/23301#M799</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2016-05-19T03:38:22Z</dc:date>
    </item>
  </channel>
</rss>

