<?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: Model Builder Iterate and test record count in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iterate-and-test-record-count/m-p/798027#M2812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing that works is to add a &lt;EM&gt;Get Count&lt;/EM&gt; and then set a &lt;EM&gt;Precondition&lt;/EM&gt; for the function that you want to trigger to keep it from operating if the Get Count condition is not true.&amp;nbsp; Note that this is not real obvious on how to make this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example, in this case the Model is set up to copy 5 feature classes from one &lt;EM&gt;Feature Dataset&lt;/EM&gt; to another as long as the &lt;EM&gt;feature class&lt;/EM&gt; contains at least one record.&amp;nbsp; So in this example, &lt;EM&gt;ParcelSet3&lt;/EM&gt; has no records (I deleted them all before running this), so was not copied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="285185" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/285185_IterateSome_screenshot.jpg" style="width: 620px; height: 409px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/285178_Parcelset3.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="285186" alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/285186_IterateSomeArcCatalog.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm"&gt;Get Count—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility would be to do some branching with &lt;EM&gt;For If loops&lt;/EM&gt; in Python and then use those as to make script tools to incorporate into to your model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Using_If_Then_Else_logic_for_branching/002w00000022000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/Using_If_Then_Else_logic_for_branching/002w00000022000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; -&lt;EM&gt; If you are stuck at "If" -&lt;/EM&gt; &lt;EM&gt;Modelbuilder&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you are good at &lt;EM&gt;Python&lt;/EM&gt;, skip &lt;EM&gt;Modelbuilder&lt;/EM&gt; and do the whole thing in &lt;EM&gt;Python&lt;/EM&gt;.&amp;nbsp; As a shortcut, one can dump out the &lt;EM&gt;Modelbuilder&lt;/EM&gt; stuff you already have as&lt;EM&gt; Python&lt;/EM&gt; snippets to help get started.&lt;/P&gt;&lt;P&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>Fri, 16 Dec 2016 23:52:11 GMT</pubDate>
    <dc:creator>ChrisDonohue__GISP</dc:creator>
    <dc:date>2016-12-16T23:52:11Z</dc:date>
    <item>
      <title>Model Builder Iterate and test record count</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iterate-and-test-record-count/m-p/798026#M2811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running through an intersect layer and iterator in model builder to produce many feature classes. &amp;nbsp;I'd like to test the output with a get count or script - if it has records, produce the FC, if not, do not produce the FC. &amp;nbsp;Unfortunately, the first FC it finds that does not have records stops the model - it will not move on to the next iteration. &amp;nbsp;How do I set up the model so it continues through the iterations? &amp;nbsp; Is this where a submodel comes in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 20:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iterate-and-test-record-count/m-p/798026#M2811</guid>
      <dc:creator>ScottGarrett</dc:creator>
      <dc:date>2016-12-16T20:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder Iterate and test record count</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iterate-and-test-record-count/m-p/798027#M2812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing that works is to add a &lt;EM&gt;Get Count&lt;/EM&gt; and then set a &lt;EM&gt;Precondition&lt;/EM&gt; for the function that you want to trigger to keep it from operating if the Get Count condition is not true.&amp;nbsp; Note that this is not real obvious on how to make this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example, in this case the Model is set up to copy 5 feature classes from one &lt;EM&gt;Feature Dataset&lt;/EM&gt; to another as long as the &lt;EM&gt;feature class&lt;/EM&gt; contains at least one record.&amp;nbsp; So in this example, &lt;EM&gt;ParcelSet3&lt;/EM&gt; has no records (I deleted them all before running this), so was not copied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="285185" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/285185_IterateSome_screenshot.jpg" style="width: 620px; height: 409px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/285178_Parcelset3.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="285186" alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/285186_IterateSomeArcCatalog.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm"&gt;Get Count—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility would be to do some branching with &lt;EM&gt;For If loops&lt;/EM&gt; in Python and then use those as to make script tools to incorporate into to your model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Using_If_Then_Else_logic_for_branching/002w00000022000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/Using_If_Then_Else_logic_for_branching/002w00000022000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; -&lt;EM&gt; If you are stuck at "If" -&lt;/EM&gt; &lt;EM&gt;Modelbuilder&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you are good at &lt;EM&gt;Python&lt;/EM&gt;, skip &lt;EM&gt;Modelbuilder&lt;/EM&gt; and do the whole thing in &lt;EM&gt;Python&lt;/EM&gt;.&amp;nbsp; As a shortcut, one can dump out the &lt;EM&gt;Modelbuilder&lt;/EM&gt; stuff you already have as&lt;EM&gt; Python&lt;/EM&gt; snippets to help get started.&lt;/P&gt;&lt;P&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>Fri, 16 Dec 2016 23:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iterate-and-test-record-count/m-p/798027#M2812</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2016-12-16T23:52:11Z</dc:date>
    </item>
  </channel>
</rss>

