Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

2 Answers 2

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:

in_memory\out%n%

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

C:\path\to\out%n%

share|improve this answer

Your Answer

 
discard

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.