I have created a model that creates a random point data set for a certain area, conducts a spatial join of these points to polygons, calculates the frequency of a certain field in the joined table, and exports this frequency table to excel.

Ideally, I need to be able to run this random point model 1000 times so I can construct a distribution of the exported field frequencies to use as a null model for statistical testing (in another program).

How do I go about doing this without having to manually manipulate the model after every run?

I'm unsure of how to avoid 1) removing the spatial join in the model manually after every iteration, and 2) the exported excel being overwritten due to the output file having the same name as the previous iteration of the model.

If you're able to provide tools I can use within ModelBuilder, that would be preferred.

Current Model: input layer -> create random points (tool) -> output and polygon layer for join - > spatial join (tool) -> output -> frequency (tool) -> output -> table to excel (tool) -> excel file

  • You say "I'm afraid it will overwrite the file that was produced from the previous iteration". The best way to dispel or confirm those fears is to run your model, or a test model, against a test dataset.
    – PolyGeo
    Commented Mar 31, 2016 at 23:01
  • 1
    With iteration in ModelBuilder, you can append _%n% to the output parameter. That way, your results will be saved for each as result_1, result_2, etc.
    – Paul
    Commented Mar 31, 2016 at 23:12

1 Answer 1


If you are going to repeat this 1,000 times in ModelBuilder you will need to be using an Iterator.

The Iterator to investigate will be For which:

Iterates over a starting and ending value by a given value. It works exactly like For in any scripting/programming language, executing through a set number of items.

However, I think you will find this very slow in comparison to performing the same operations using ArcPy.

  • I've looked up iterators, but I've been unable this far to figure out which one(s) would be appropriate to accomplish this task. I'm unfamiliar with ArcPy, so I'd like to stick to using ModelBuilder unless the code is quite simple using ArcPy. Commented Mar 31, 2016 at 23:29

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.