<?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: Feature Class Check Python/Modelbuilder in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158545#M12156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;as I understand this you have two GDBs (one.gdb and two.gdb)&lt;BR /&gt;each with, say, one data set&lt;BR /&gt;and each data set has a bunch of feature classes&lt;BR /&gt;&lt;BR /&gt;one.gdb\dataset1\&lt;BR /&gt;has&lt;BR /&gt;fc1&lt;BR /&gt;fc2&lt;BR /&gt;fc3&lt;BR /&gt;fc4&lt;BR /&gt;fc5&lt;BR /&gt;fc6&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;two.gdb\dataset1\&lt;BR /&gt;has&lt;BR /&gt;fc1&lt;BR /&gt;fc2&lt;BR /&gt;fc4&lt;BR /&gt;fc5&lt;BR /&gt;fc6&lt;BR /&gt;(no fc3)&lt;BR /&gt;&lt;BR /&gt;you want to append from gdb one to two&lt;BR /&gt;&lt;BR /&gt;so you would use listfeatureclasses to list what is in one.gdb\dataset1\&lt;BR /&gt;call it fcONElist&lt;BR /&gt;loop through that list of fc names, testing for each in two.gdb\dataset1\&lt;BR /&gt;to wit:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for fc in fcONElist:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if not arcpy.Exists(r"path\two.gdb\dataset1\%s" % (fc)):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "not found: ", fc
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- do the append --&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I am sure it is more complex than this, but this is essentially the thing you need to do, eh?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is correct, sorry for the late reply. This project got put aside for a bit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:22:30 GMT</pubDate>
    <dc:creator>BrettAuger1</dc:creator>
    <dc:date>2021-12-11T08:22:30Z</dc:date>
    <item>
      <title>Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158537#M12148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to build a model that inputs one geodatabase into an other. The problem I am having is the schema for the geodatabases is the same however there may or may not always be a input file to send to the output database and this is causing errors. Right now my model searches for a featureclass then appends it to another. Right now if it does not find the correct class is outputs and error and stops my model. I found this bit of code, however it is searching for a field rather than a featureclass. Is there a piece of code where I can use a similar tool but for searching if a feature class exists inside a dataset. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brett&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;#********************************************************************** # Description: # Tests if a field exists and outputs two booleans: #&amp;nbsp;&amp;nbsp; Exists - true if the field exists, false if it doesn't exist #&amp;nbsp;&amp;nbsp; Not_Exists - true if the field doesn't exist, false if it does exist #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (the logical NOT of the first output). # # Arguments: #&amp;nbsp; 0 - Table name #&amp;nbsp; 1 - Field name #&amp;nbsp; 2 - Exists (boolean - see above) #&amp;nbsp; 3 - Not_Exists (boolean - see above) # # Created by: ESRI #**********************************************************************&amp;nbsp; # Standard error handling - put everything in a try/except block # try:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Import system modules &amp;nbsp;&amp;nbsp;&amp;nbsp; import sys, string, os, arcgisscripting&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Create the Geoprocessor object &amp;nbsp;&amp;nbsp;&amp;nbsp; gp = arcgisscripting.create()&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Get input arguments - table name, field name &amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp; in_Table = gp.GetParameterAsText(0) &amp;nbsp;&amp;nbsp;&amp;nbsp; in_Field = gp.GetParameterAsText(1)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # First check that the table exists &amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp; if not gp.Exists(in_Table): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise Exception, "Input table does not exist"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Use the ListFields function to return a list of fields that matches &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; the name of in_Field. This is a wildcard match. Since in_Field is an &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; exact string (no wildcards like "*"), only one field should be returned, &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; exactly matching the input field name. &amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp; fields = gp.ListFields(in_Table, in_Field)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # If ListFields returned anything, the Next operator will fetch the &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; field. We can use this as a Boolean condition. &amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp; field_found = fields.Next()&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Branch depending on whether field found or not. Issue a &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; message, and then set our two output variables accordingly &amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp; if field_found: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage("Field %s found in %s" % (in_Field, in_Table)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetParameterAsText(2, "True") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetParameterAsText(3, "False") &amp;nbsp;&amp;nbsp;&amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage("Field %s not found in %s" % (in_Field, in_Table)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetParameterAsText(2, "False") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.SetParameterAsText(3, "True")&amp;nbsp;&amp;nbsp; # Handle script errors # except Exception, errMsg:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # If we have messages of severity error (2), we assume a GP tool raised it, &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; so we'll output that.&amp;nbsp; Otherwise, we assume we raised the error and the &amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; information is in errMsg. &amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp; if gp.GetMessages(2):&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddError(GP.GetMessages(2)) &amp;nbsp;&amp;nbsp;&amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddError(str(errMsg))&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:28:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158537#M12148</guid>
      <dc:creator>BrettAuger1</dc:creator>
      <dc:date>2014-05-23T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158538#M12149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just how does&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if arcpy.Exists(r"path\dataset\featureclass"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;not allow you to avoid an error?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:36:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158538#M12149</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2014-05-23T14:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158539#M12150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My thoughts are that if the IF statement returns false then that section of the model will not continue and will move on to validate the next feature and so on. I am new to the implentation of python but this seemed like it may do the trick. I am not set up one piece of code, rather the idea. Ideally, if a code could verify if data existed then if "true" continue on with that section of the model and if "false" end that section and move on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brett&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just how does&lt;BR /&gt;&lt;BR /&gt;if arcpy.Exists(r"path\dataset\featureclass"):&lt;BR /&gt;&lt;BR /&gt;not allow you to avoid an error?&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158539#M12150</guid>
      <dc:creator>BrettAuger1</dc:creator>
      <dc:date>2014-05-23T14:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158540#M12151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Brett,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you say "&lt;/SPAN&gt;&lt;SPAN style="color:#333333;"&gt;model searches for a featureclass" are you using an Iterator? If you use a FeatureClass iterator that will return all the FeatureClasses in a workspace, so missing ones are never an issue. Have a look at that, if that is not how you are searching for FeatureClasses the I suggest you upload an image of your model for us to understand.&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:28:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158540#M12151</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-05-23T16:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158541#M12152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Right now I have a nested iterator model inside my working model. In the image below I have an input GDB and a destination GDB, the destination uses a select select data function which is simple because this does not change. The input GDB goes thru an iterator to search based on a wildcard statment. My problem is that sometimes the feature class does not exist but it tries to run the append tool anyway even tho the iterator didnt find what it needed. My ask is for a function to go between the append and the iterator function to stop the append if the data does not exist. If the iterator does not find the feature class based on the wildcard statment it spits out a feature class with a made up name. This made up feature class does not exist and that hangs up the append function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate all the help, these things get complicated to explain via forum post. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Brett,&lt;BR /&gt;&lt;BR /&gt;When you say "&lt;SPAN style="color:#333333;"&gt;model searches for a featureclass" are you using an Iterator? If you use a FeatureClass iterator that will return all the FeatureClasses in a workspace, so missing ones are never an issue. Have a look at that, if that is not how you are searching for FeatureClasses the I suggest you upload an image of your model for us to understand.&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158541#M12152</guid>
      <dc:creator>BrettAuger1</dc:creator>
      <dc:date>2014-05-23T16:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158542#M12153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your sub-model Input Riparian Point- is it your intention to "spit out" a single FeatureClass at a time or a bunch of FeatureClasses based upon your wild card. If it is meant to be a single FeatureClass I see no reason for it to be a sub model unless its doing some other complex stuff so you could probably do away with the collects tool.&amp;nbsp; Normally the collects tool is the output parameter of a sub-model which you would link directly to the append tool. Have a look at this &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/questions/94990/how-to-merge-output-shapefiles-in-model-builder/95083#95083"&gt;question&lt;/A&gt;&lt;SPAN&gt; I answered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try tweaking these first?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 17:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158542#M12153</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-05-23T17:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158543#M12154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I copied for an image above is a one section of the model I need. The output database has ~23 feature classes that need to be appended however the input may not have a match for the ~23. So my model right now has 23 or so copies of the image I posted above. So each of the previously shared functions should produce 1/23 of the feature classes then move on to the next. When I put a stop function in or something similar it it stops all functions past that point. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Your sub-model Input Riparian Point- is it your intention to "spit out" a single FeatureClass at a time or a bunch of FeatureClasses based upon your wild card. If it is meant to be a single FeatureClass I see no reason for it to be a sub model unless its doing some other complex stuff so you could probably do away with the collects tool.&amp;nbsp; Normally the collects tool is the output parameter of a sub-model which you would link directly to the append tool. Have a look at this &lt;A href="http://gis.stackexchange.com/questions/94990/how-to-merge-output-shapefiles-in-model-builder/95083#95083"&gt;question&lt;/A&gt; I answered.&lt;BR /&gt;&lt;BR /&gt;Try tweaking these first?&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 17:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158543#M12154</guid>
      <dc:creator>BrettAuger1</dc:creator>
      <dc:date>2014-05-23T17:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158544#M12155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;as I understand this you have two GDBs (one.gdb and two.gdb)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;each with, say, one data set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and each data set has a bunch of feature classes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;one.gdb\dataset1\&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;has&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;two.gdb\dataset1\&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;has&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(no fc3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you want to append from gdb one to two&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so you would use listfeatureclasses to list what is in one.gdb\dataset1\&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;call it fcONElist&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;loop through that list of fc names, testing for each in two.gdb\dataset1\&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to wit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;for fc in fcONElist: &amp;nbsp;&amp;nbsp;&amp;nbsp; if not arcpy.Exists(r"path\two.gdb\dataset1\%s" % (fc)): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "not found: ", fc &amp;nbsp;&amp;nbsp;&amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- do the append --&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure it is more complex than this, but this is essentially the thing you need to do, eh?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 11:26:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158544#M12155</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2014-05-27T11:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Check Python/Modelbuilder</title>
      <link>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158545#M12156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;as I understand this you have two GDBs (one.gdb and two.gdb)&lt;BR /&gt;each with, say, one data set&lt;BR /&gt;and each data set has a bunch of feature classes&lt;BR /&gt;&lt;BR /&gt;one.gdb\dataset1\&lt;BR /&gt;has&lt;BR /&gt;fc1&lt;BR /&gt;fc2&lt;BR /&gt;fc3&lt;BR /&gt;fc4&lt;BR /&gt;fc5&lt;BR /&gt;fc6&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;two.gdb\dataset1\&lt;BR /&gt;has&lt;BR /&gt;fc1&lt;BR /&gt;fc2&lt;BR /&gt;fc4&lt;BR /&gt;fc5&lt;BR /&gt;fc6&lt;BR /&gt;(no fc3)&lt;BR /&gt;&lt;BR /&gt;you want to append from gdb one to two&lt;BR /&gt;&lt;BR /&gt;so you would use listfeatureclasses to list what is in one.gdb\dataset1\&lt;BR /&gt;call it fcONElist&lt;BR /&gt;loop through that list of fc names, testing for each in two.gdb\dataset1\&lt;BR /&gt;to wit:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for fc in fcONElist:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if not arcpy.Exists(r"path\two.gdb\dataset1\%s" % (fc)):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "not found: ", fc
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- do the append --&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I am sure it is more complex than this, but this is essentially the thing you need to do, eh?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is correct, sorry for the late reply. This project got put aside for a bit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:22:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-class-check-python-modelbuilder/m-p/158545#M12156</guid>
      <dc:creator>BrettAuger1</dc:creator>
      <dc:date>2021-12-11T08:22:30Z</dc:date>
    </item>
  </channel>
</rss>

