0

I have created a model that is meant to be run regularly to update an existing data set with new data. Ideally, the model will be able to simply overwrite the old data with the new data which would have the same file name. However, when I try to run the model, I get an error that it cannot run because files with those names already exist. I already have "Overwrite the outputs of geoprocessing operations" checked on, so I'm not sure what else can be preventing it from running.

Are there any other parameters that need to be set to enable automatic overwriting?

Everyone on the internet seems to be having the opposite problem that I am!

Start Time: Tue Feb 12 16:27:35 2019
ERROR 000210: Cannot create output O:\GIS\ArcGIS_Pro\Data_Analysis_and_Planning\gswiBasin
The table already exists.
The table was not found. [gswiBasin]
Failed to execute (Copy Features: Copy files into working database).
Failed at Tue Feb 12 16:27:36 2019 (Elapsed Time: 0.86 seconds)
  • 2
    Please always provide errors as text rather than pictures so that they can be searched and are easy to read on all devices. – PolyGeo Feb 12 at 21:25
  • The file path O:\GIS\ArcGIS_Pro\Data_Analysis_and_Planning\gswiBasin would imply you trying to create a coverage output, was that your intention? What was your intended output? If for example you wanted to write the features to a new featureclass in a file geodatabase then you are missing your geodatabase. – Hornbydd Feb 12 at 22:26
  • I carelessly shortened the file path to remove path names that pointed to the entity that I work for before posting it here. They're going into a geodatabase. – Shaleby Feb 12 at 22:31
  • Well the problem may be there and showing us misleading paths is not really helpful is it? Also not actually showing the model is unhelpful, may be you have created some wacky logic that is using sub-modelling and file locking? But as we have no idea what you have attempted we can't rule that out. So you are not show us the model and providing a snippet of information which turns out to be misleading... not sure anyone is going to be able to really help you here... Suggest you amend you question and provide significantly more detail. – Hornbydd Feb 12 at 22:51
2

I've found that I sometimes need to rebuild the Model, or at least the components that are failing, once I've run it once.

The best thing to do would be export the model as Python, lead it with:

    arcpy.env.overwriteOutput=True

and then run it in the Python window. I know that's an annoying answer, but after banging my head against the wall that is Model Builder for almost a month at the start of my first GIS job, I gave up and learned Python. It's so much faster and more reliable!

-------------------UPDATE---------------------------

Have you considered building a script tool? All the code is in Python (and executes directly in Python), but you use arcpy.GetParameter(ind) or .GetParameterAsText(ind) to collect user input rather than hard definitions. When you create the script tool in ArcMap or ArcCatalog, you specify how many inputs of specified types there will be on the tool pane, and make them correspond to the indices in your code.

Ex:

    in_table = arcpy.GetParameter(0)
    out_table = arcpy.GetParameter(1)

When setting up the script tool, you'd specify the first and second inputs be Tables or TableViews.

The benefit of this route is that you get the user-friendly UI of a geoprocessing tool, but the functionality of Python rather than Model Builder's clunkiness.

ArcMap Script Tool Documentation

ArcPro Script Tool Documentation

  • I agree Python is preferable and I'll definitely try as a Python code, although in my experience exporting models into code doesn't always work as logically as you'd hope. Unfortunately, I think for the purposes of this project, having a model is the preferred option because it's more replicable and accessible for other users who are unfamiliar with Python. – Shaleby Feb 12 at 22:29
  • 1
    Have a read of resources.arcgis.com/en/help/main/10.2/index.html#//… about setting overwrite to true just for the model you are editing. I have changed the default to true for all geoprocessing environments but I can understand why newer users would leave it set to false to avoid accidentally overwriting source datasets. – Michael Stimson Feb 12 at 23:48
  • That resource is for ArcGIS 10.2 and the environments panel no longer contains the overwrite true/false option. It's now located in the geoprocessing options panel, which I state in my original post that I have already set to overwrite. – Shaleby Feb 13 at 15:01
  • See my update for suggestion on creating a Script Tool :) – flintlockspecial Feb 13 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.