I am trying to make a model that basically updates an original file with new data. I do this by using a mask to "erase" old data and then "merging" in the new data, however this creates a separate feature class. Since the original file is on a shared network, I can't just overwrite the file.

To achieve my goal of updating the original file, I empty it with "Truncate table"(Input %Name% being the orginal file, decided in the "Iterate Feature Classes"), after which I use "Append" to put the new data inside.

Seeing as my users might want to run multiple feature classes at once, I use an "Iterate Feature Classes" at the beginning of my tool.

My problem is in the result, my "updated feature class" gets created correctly with data and, for as far as I can tell, the "original feature class" gets emptied. However, somehow when the tool is done running, it returns an empty output (over the entire feature class, not just the updated bit underneath the mask). I have tried all different options of preconditioning, but nothing seems to be a solution.

It is important to note that, if I run these bit by bit in ModelBuilder itself, it does produce the correct result, but when I run the model it does not.

  • The same result happens if I use "delete features" or "delete rows"
  • Putting them into seperate models (making the updated file, emptying the original file and then appending) and putting those models into one model, also gives the same empty output

I am running ArcGIS Desktop 10.3.1. As extra information, I added a pictures of the attribute tables before and after the model runs and the model itself. I have been at this for several days and I cannot figure it out. The inout "New file" is the adjustments made feature class from the screenshot below.

Before Before

Adjustments made Adjustments

After After

Model Model

  • Looking at the help file for that error code it suggests that what ever %Name% (2) is, it is not a geodatabase table, so what is it? Please show us what you are inputting into the tool. – Hornbydd Jan 17 '19 at 9:41
  • %Name% (2) is the location of the original files geodatabase followed by the "Name" (as determined in the Iterate feature classes tool). It works fine if I run it in the modelbuilder itself, just not "outside" of it. Which makes me think it might not be able to register that it is indeed a feature class (Precondition didn't work with this either). Any thoughts on that? – Remko Jan 17 '19 at 9:44
  • Note: The error pops up before the tool even starts, so it doesn't appear as the tool is running. – Remko Jan 17 '19 at 9:58
  • I do not know what the problem is, as for me, it is working, which hints it might be a version issue and nothing you can fix. Just been thinking about your problem, instead of trying to Truncate the table, why not create a new table, you can using an existing table to act as a schema, then delete the old one? OK this is 3 steps (Create>Delete old>Rename New) but then it should work? – Hornbydd Jan 22 '19 at 11:25
  • My problem is that the feature class is within a network in which I cannot add/replace a feature class (It works with version manager). So I have to, somehow, make this work. I could perhaps make a seperate model that would "update" and see if the issue is resolved that way. I am going to give that a try! Thank you for all your advice so far, sometimes it's hard to see the forest through the tree's. – Remko Jan 22 '19 at 11:31

Your Answer

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

Browse other questions tagged or ask your own question.