<?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 help in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1478107#M83706</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/51132"&gt;@DavidAdelsberg&lt;/a&gt;&amp;nbsp; - you're welcome!&amp;nbsp; I've enjoyed working through this workflow!&amp;nbsp; I think I have a better understanding of the issue and a solution that mixes ModelBuilder and some Python.&amp;nbsp; Instead of worrying about Models and Submodels to run iterators (can only have one iterator per model but submodels do get around this issue, I decided to create 3 standalone models and 1 Python script tool in a Toolbox.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; The first model is the Delete Model.&amp;nbsp; It deletes all feature classes and feature datasets. The standalone Delete GP tool is hardcoded to delete the FDS in the target. See image below.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeleteModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105254i30D1B950D2FD0A23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DeleteModel.JPG" alt="DeleteModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The next model is the Copy Feature Class Model - this copies all FC's from the source geodatabase to the target geodatabase.&amp;nbsp; See image below.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CopyFeaturesModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105255i98840F917FFC016F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CopyFeaturesModel.JPG" alt="CopyFeaturesModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; The next model copies the Feature Datasets from the source geodatabase to the target geodatabase.&amp;nbsp; The key with this one is using the %Name% inline variable for the output data parameter in the Copy GP tool.&amp;nbsp; This will use the name of the input FDS and copy an exact copy of the name in the target GDB.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CopyFeatureDatasetModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105259i6B277322A759BB3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CopyFeatureDatasetModel.JPG" alt="CopyFeatureDatasetModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; Next I created a simple Python script that calls the models sequentially.&amp;nbsp; See image below:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RunModelInSequencePythonScript.JPG" style="width: 375px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105256i53B4839641FE0AAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RunModelInSequencePythonScript.JPG" alt="RunModelInSequencePythonScript.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Lastly, in the project toolbox, I right-clicked on the toolbox and selected Script and fill out the tabs to point to the Python script.&amp;nbsp; This is now a Python Script tool you can rerun regularly.&amp;nbsp; I've tested it many times and there are no _1's or _2's present.&amp;nbsp; One last thing to double check is your Project-&amp;gt;Options-&amp;gt;Geoprocessing tab for the "Allow geoprocessing tools to overwrite existing datasets" is checked on.&lt;BR /&gt;&lt;BR /&gt;Let me know what you discover from the process setting it to your enterprise geodatabase connections.&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 22:32:15 GMT</pubDate>
    <dc:creator>Robert_LeClair</dc:creator>
    <dc:date>2024-05-23T22:32:15Z</dc:date>
    <item>
      <title>Model Builder help</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1477207#M83620</link>
      <description>&lt;P&gt;Hoping to get help with model builder and a model I built.&amp;nbsp; I know there has to be an easier setup then the gigantic model I have.&amp;nbsp; Overall I'm trying to use the feature to feature tool to copy feature classes from one gdb to another and I'm doing this on a nightly basis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before that copy occurs, I need to delete the existing feature classes in the gdb that will be copied to.&amp;nbsp; I understand there is an option to overwrite existing features but it doesn't work and I keep getting a copied feature class with '_1' after the name....so 'parcelnum_1' since there's already a 'parcelnum' in there from previous update.&lt;/P&gt;&lt;P&gt;The model I built is extremely big and redundant, but that's from lack of experience and knowledge using model builder.&amp;nbsp; So again, what I need to do is copy feature class to feature class but delete the existing ones in the copy to gdb before the new ones are copied.&lt;/P&gt;&lt;P&gt;Please see attached photo of what I created and any help to streamline this process would be appreciated.&amp;nbsp; I have 3 different datasets with several feature classes in each.&lt;/P&gt;&lt;P&gt;I set it up to copy all the feature classes to gdb but before that, as a precondition, that each feature class is deleted first and than it copies.&amp;nbsp; Everything works fine, just wanting to see if there's an easier model process to follow.&amp;nbsp; Thanks for any help/guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Copy Feature Classes.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105001i181EB55D9083D949/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Copy Feature Classes.jpg" alt="Copy Feature Classes.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 19:20:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1477207#M83620</guid>
      <dc:creator>DavidAdelsberg</dc:creator>
      <dc:date>2024-05-22T19:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder help</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1477237#M83625</link>
      <description>&lt;P&gt;David - so I looked into ModelBuilder, your model and perhaps a way of doing it better with iterators and a submodel embedded in the main model (typically you can only have 1 iterator per model but a sub-model allows you to have multiple iterators!).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The first thing I did was create a new model (submodel) using the Iterate Feature Classes iterator.&amp;nbsp; I double clicked the Iterate Feature Class iterator and set the Workspace or Feature Dataset parameter to my fGBD that has the FC's I wish to delete. I set the Wildcard to an asterisk for all FC's.&amp;nbsp; I connected the green oval to the Delete GP tool.&amp;nbsp; Select all the graphical items in the model, right-click and click Group from the Context menu.&amp;nbsp; Next right-click again and select Save as Model and save it in your Custom Toolbox. (see Image 1)&lt;/P&gt;&lt;P&gt;Next, create a new model.&amp;nbsp; Drag and drop the newly created submodel onto the new model canvas.&amp;nbsp; I then added the Iterate Feature Classes iterator.&amp;nbsp; Double-click the Iterate Feature Classes iterator.&amp;nbsp; For Workspace or Feature Dataset parameter, navigate to your other GDB that has the new data to copy into the other GDB.&amp;nbsp; I set the wildcard parameter again with an asterisk for all FC's.&lt;/P&gt;&lt;P&gt;Next add the Copy GP tool to your model and connect the green oval to the Copy GP tool. (See Image 2)&lt;/P&gt;&lt;P&gt;Save your and name this model in your custom toolbox.&amp;nbsp; You should now have 2 toolboxes - 1 for the submodel and 1 for the main model.&lt;/P&gt;&lt;P&gt;The key to making this approach work is in the Catalog Pane under Databases, be sure to set your output geodatabase as the default geodatabase.&amp;nbsp; Right-click on the target GDB and select Make Default.&lt;/P&gt;&lt;P&gt;In the main model modelbuilder view, select validate and run from the run group on the ModelBuilder tab.&amp;nbsp; This workflow works for me and I think simplifies what you're trying to do.&lt;/P&gt;&lt;P&gt;Caveat - of course - Python is a better approach.&amp;nbsp; I can export this out as a Python script and tweak the script more.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Submodel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105011iC0076F1BEBAC45AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Submodel.JPG" alt="Submodel.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MainModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105012i2775929FB0317C8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MainModel.JPG" alt="MainModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 20:19:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1477237#M83625</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2024-05-22T20:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder help</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1477990#M83694</link>
      <description>&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;I appreciate your time looking into this and helping.&amp;nbsp; While the initial model build was successful, it doesn't work when trying to re-run when I want to run an update each day.&amp;nbsp; I get an error message.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error message.JPG" style="width: 735px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105219i7CA97F031A2286E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="error message.JPG" alt="error message.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, I don't like the fact of having to use the default gdb.&amp;nbsp; I all ready have 1 I need to use instead.&amp;nbsp; Not sure it would work using the one I created??&amp;nbsp; Overall, the process was way faster to complete though.&amp;nbsp; I'm going to try and tweak some things and see if I can get to work using your model format, but adjust some things.&lt;/P&gt;&lt;P&gt;I also have 3 datasets.&amp;nbsp; I assume I would recreate the initial model and just point to the other 2 datasets?&amp;nbsp; Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 20:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1477990#M83694</guid>
      <dc:creator>DavidAdelsberg</dc:creator>
      <dc:date>2024-05-23T20:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder help</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1478107#M83706</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/51132"&gt;@DavidAdelsberg&lt;/a&gt;&amp;nbsp; - you're welcome!&amp;nbsp; I've enjoyed working through this workflow!&amp;nbsp; I think I have a better understanding of the issue and a solution that mixes ModelBuilder and some Python.&amp;nbsp; Instead of worrying about Models and Submodels to run iterators (can only have one iterator per model but submodels do get around this issue, I decided to create 3 standalone models and 1 Python script tool in a Toolbox.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; The first model is the Delete Model.&amp;nbsp; It deletes all feature classes and feature datasets. The standalone Delete GP tool is hardcoded to delete the FDS in the target. See image below.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeleteModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105254i30D1B950D2FD0A23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DeleteModel.JPG" alt="DeleteModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The next model is the Copy Feature Class Model - this copies all FC's from the source geodatabase to the target geodatabase.&amp;nbsp; See image below.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CopyFeaturesModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105255i98840F917FFC016F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CopyFeaturesModel.JPG" alt="CopyFeaturesModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; The next model copies the Feature Datasets from the source geodatabase to the target geodatabase.&amp;nbsp; The key with this one is using the %Name% inline variable for the output data parameter in the Copy GP tool.&amp;nbsp; This will use the name of the input FDS and copy an exact copy of the name in the target GDB.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CopyFeatureDatasetModel.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105259i6B277322A759BB3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CopyFeatureDatasetModel.JPG" alt="CopyFeatureDatasetModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; Next I created a simple Python script that calls the models sequentially.&amp;nbsp; See image below:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RunModelInSequencePythonScript.JPG" style="width: 375px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105256i53B4839641FE0AAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RunModelInSequencePythonScript.JPG" alt="RunModelInSequencePythonScript.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Lastly, in the project toolbox, I right-clicked on the toolbox and selected Script and fill out the tabs to point to the Python script.&amp;nbsp; This is now a Python Script tool you can rerun regularly.&amp;nbsp; I've tested it many times and there are no _1's or _2's present.&amp;nbsp; One last thing to double check is your Project-&amp;gt;Options-&amp;gt;Geoprocessing tab for the "Allow geoprocessing tools to overwrite existing datasets" is checked on.&lt;BR /&gt;&lt;BR /&gt;Let me know what you discover from the process setting it to your enterprise geodatabase connections.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 22:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1478107#M83706</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2024-05-23T22:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder help</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1479624#M83850</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2538"&gt;@Robert_LeClair&lt;/a&gt; Thank you again for taking the time to explore this.&amp;nbsp; I haven't had time yet to test this as I've been very busy with work.&amp;nbsp; I will try this out and report back to you and let you know how it worked.&amp;nbsp; Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 16:26:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/model-builder-help/m-p/1479624#M83850</guid>
      <dc:creator>DavidAdelsberg</dc:creator>
      <dc:date>2024-05-28T16:26:30Z</dc:date>
    </item>
  </channel>
</rss>

