1

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.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338

1 Answers1

1

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?

Hornbydd
  • 43,380
  • 5
  • 41
  • 81
  • 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 02 '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 02 '16 at 14:15