enter image description hereI've build a model using the ArcGIS ModelBuilder. The model uses an iterator that clips all the features in a specific geodatabase. The iterator-part is nested in a submodel. I want that geodatabase ("Clipping-InputGDB") to be deleted after all the features within it have been clipped. Is there a way to do that?

Screenshot shows submodel.


You could try putting a delete tool in the master model. You make the sub model a precondition to the delete tool to ensure the correct order of execution.

Without testing, you might not be able to do it as you might get a schema lock?

  • I cannot make the submodel a precondition since only variables can be preconditions. But in this case with the iteration in the submodel, there is not a single output variable that could trigger a delete tool, no matter if it's inside the submodel or in the master model. – jack.valentine Oct 2 '16 at 10:39
  • 1
    You could put in a Calculate value tool that checks the number of outputs being created (with a little bit of python) and that returns a True or False which you can expose as a parameter to be the precondition OR simply create a Boolean variable and set it to True and expose that if you know your clipping will always succeed? – Hornbydd Oct 2 '16 at 14:15

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.