I'm working on a project where I have to iterate through geodatabases and handle some debug errors if they exist. For this I've created a ModelBuilder model, in ArcGIS 10.7.

Essentially, what the model does is iterate to the different databases (LoggGeoDB in the model) and using calculate value to determine if the file exists, using this as a precondition for selection. The calculation works fine, but the precondition fails on the second iteration.

First iteration: None of the data sets exist, and all the Select processes successfully do not run: "The process did not execute because the precondition is false." As intended.

Second iteration: Calculate Value and Calculate Value (3) finds their corresponding data sets and returns true, and the data is selected correctly. Calculate Value (2) still returns false, as intended, but Select Data (4) still runs, even though the precondition is false.

Any ideas for how to work around this - would prefer to keep it as a model if possible. I've tried to make the Calculate Value (2) always return false, bypassing the code, but the problem persists.

I also just tried making all the calculate value tools always return false, but Select Data (4) still attempts to run (the other two aborted as intended).

Model created to iterate

  • 1
    I've had issues with model builder remembering the initial state of a precondition and have reported it as a bug to ESRI UK. Try deleting Select Data (4), validate, add a new Select Data tool, break the links, validate, then rebuild links. Or even try building the model from scratch. – Hornbydd Jul 11 at 11:55
  • Appreciate the feedback. Just removing and readding the Select didn't work. I'll try to remake the whole thing later to see if that does something. The weird thing is that it isn't the previous state either, as it's been false on all the iterations leading up to this. – Eirik Osnes Jul 11 at 13:09

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.