<?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: How to stop output of empty feature datasets with model in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108318#M3722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, the only way I see achieving this is to script in an If...Then conditional statement which will read a row count for all of your output feature classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If Feature Class Row Count = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Delete Feature Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this script on another forum that returns the row count, you may be able to easily change it run in your conditional statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;totalRecordCount = int(gp.GetCount_management(gp.describe(featureLayer).catalogpath).getoutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2011 13:37:51 GMT</pubDate>
    <dc:creator>ChristopherBlinn1</dc:creator>
    <dc:date>2011-07-28T13:37:51Z</dc:date>
    <item>
      <title>How to stop output of empty feature datasets with model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108317#M3721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have set up a simple model that will select features in a feature class (personal geodatabase) based on an expression and then output the selected features into a new feature class.&amp;nbsp; I have set up an iterator so that I can select the feature dataset and it will run the above described process on each feature class in said dataset.&amp;nbsp; The problem is that the model will create an output feature class whether the select criteria was met or not.&amp;nbsp; In other words, whenever there is a feature class that does not meet the criteria, nothing is selected, then it creates an empty feature dataset.&amp;nbsp; I want to either avoid the creation of these empty datsets, or delete them on the back end.&amp;nbsp; I can't figure out how to do either in model builder (I don't do code...sorry).&amp;nbsp; Image attached...I would greatly appreciate some help with this one.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 20:42:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108317#M3721</guid>
      <dc:creator>markcrow</dc:creator>
      <dc:date>2011-07-27T20:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop output of empty feature datasets with model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108318#M3722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, the only way I see achieving this is to script in an If...Then conditional statement which will read a row count for all of your output feature classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If Feature Class Row Count = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Delete Feature Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this script on another forum that returns the row count, you may be able to easily change it run in your conditional statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;totalRecordCount = int(gp.GetCount_management(gp.describe(featureLayer).catalogpath).getoutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:37:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108318#M3722</guid>
      <dc:creator>ChristopherBlinn1</dc:creator>
      <dc:date>2011-07-28T13:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop output of empty feature datasets with model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108319#M3723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is what you can try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Use the iterator and connect the output feature class (green oval) as input to Make Feature Layer tool.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Use Make feature layer tool to make a selection based on your sql query. Connect the output to the Get Count tool.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000n7000000.htm"&gt;Get Count tool&lt;/A&gt; (see help on this tool) - if there are any selected features the output of get count tool is 1 and the tool connected to it downstream will run. if no features are selected, and the count is 0, the output of get count will be 0 and the downstream will not run. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Copy features in the end with output of make feature layer tool as input to the tool and output of the get count as the precondition to the tool.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this works for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 18:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108319#M3723</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2011-07-28T18:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop output of empty feature datasets with model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108320#M3724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked great!&amp;nbsp; Thanks for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 01:29:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/108320#M3724</guid>
      <dc:creator>markcrow</dc:creator>
      <dc:date>2011-07-29T01:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop output of empty feature datasets with model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/1108245#M25907</link>
      <description>&lt;P&gt;Can u please check this question:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/geoprocessing-questions/model-builder-collect-values-tool-empty-results/m-p/1108229#M25906" target="_blank"&gt;https://community.esri.com/t5/geoprocessing-questions/model-builder-collect-values-tool-empty-results/m-p/1108229#M25906&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 16:36:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-stop-output-of-empty-feature-datasets-with/m-p/1108245#M25907</guid>
      <dc:creator>HilalAl-Rajhi</dc:creator>
      <dc:date>2021-10-17T16:36:48Z</dc:date>
    </item>
  </channel>
</rss>

