I need to run a model in ModelBuilder 1000 times in order to obtain the average distance of random points in a wildlife species' home range to anthropogenic features. I need to find the average of the random points from EACH of the iterations. However, when running the model 1000 times, the output file is continuously being replaced, so you only end up with one output table, the very last output table.

How can I use model tools in order to force the model to save separate files for EACH iteration so that I can find the average distance of the random points to the features for EACH iteration?

I cannot seem to find ANYTHING online about this problem!


3 Answers 3


Treat your output as temporary and allow it to be replaced each time. Start with an empty master table with the same fields as your outputs, ready to receive your output and use Append to copy the temporary output into the master table.

This will give you a table with all of the outputs.

If you are using iteration as stated here (for value = x to y iteration) use the variable in %%, their example is %value%.


One approach is to save the output to the in_memory workspace, which will be much faster than writing to disk. You can use the %n% inline variable to provide a unique name (i.e. the iteration number) for each in_memory object:


You can use the same inline variable to save physical copies to disk so that you are not overwriting output:



Also possible to use MERGE each output file to the last, using a feedback loop.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.