Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to run a model in model builder 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. Does anyone know how I can 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? Thank you very much, any help would be hugely appreciated! I cannot seem to find ANYTHING online about this problem!

share|improve this question

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%.

share|improve this answer

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:


share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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