Problem with FOR in modelbuilder. Cannot overwrite the output

2657
2
05-26-2015 03:49 PM
KONPETROV
Occasional Contributor III

Hello the problem i am facing here has to do with FOR iterator in a sub-model i 've created. Although i made a precondition with FOR to create a point and run the process as many times as i defined, i get an error like 00871 and many others which warn me that my files like focal or slope or criteria cannot be overwritten or already exists.

I have enabled from the overwritting options the "Overwitte the outputs..." but i still have the same error.

This sub-model is actually the first sub-model of a series of sub-models and i thought that it would be better if i put the FOR iterator here so as not to calculate focal, slope, aspect and criteria over and over putting the FOR iterator to the entire model.

Any help would be much appreciated. Thank you

model.png

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

if the results are added to the display, they can't be overwritten, if they are being 'held' by name in another stage of the model, they can't be overwritten.  The only safe way, is to delete them using Delete_management tool when you are done with it, or, give a new name to the file during the next iteration. Also, check the filename, if it is tool long, it will let you create it but not find it...like one with spaces.

KONPETROV
Occasional Contributor III

Ok i understood that but what is the proper way if i have 3 sub-models and i want this procession to run X number of times? Where should i put FOR and how? Should i set as a precondition only the VALUE of FOR with the first sub that is connected with the other two and Add AT THE END of the last submodel a Delete_Management?

0 Kudos