I want to automate a task on ArcGIS, and I have created a function chain working well. The chain simply evaluates a point, calculates multiple hydrological rasters & values and gives output. I have 300+ points and I have to evaluate and save each one's layers results separately so I need a for loop in the start that counts the file & loops and outputs. Below you can find a Matlab - R-esque imaginary code flow what I need to do.

What I need as a code :

%% assume points.shp with 300 entities

N = count_entities(points.shp) %% Get N = 300

For i = 1:N

Point(i) = extract(points.shp(i))

Output(i) = model_function(Point(i))


I am aware of naming problems - I can solve with variable name nodes so no problem with that, my main lack-point of knowledge is establishing primary count and loop steps.

Can someone offer some step by step guidance creating this nodes?

  • 1
    You tag and talk about ModelBuilder, but mention writing Python code. Please confirm you are talking ONLY about ModelBuilder? Are you using ArcMap or ArcGIS Pro?
    – KHibma
    Commented Mar 1, 2022 at 12:34
  • By "points" you mean point layer? You have 300 point layers, or one point layer with 300 features in it?
    – Bera
    Commented Mar 1, 2022 at 12:48
  • For KHibma's question, I prefer it ONLY about ModelBuilder since I don't know Python, but if I can only do this in Python, I would try to force it. I understand coding scheme of Python when I take a glance, I just didnt use it & learn it in the past. And I am using Arcmap. For BERA's question, I have a single point file with 300 entities.
    – aoenen
    Commented Mar 1, 2022 at 13:23
  • Please use the edit button beneath your question to revise it with any requested clarifications.
    – PolyGeo
    Commented Mar 1, 2022 at 21:00

1 Answer 1


Use the Iterate Feature Selection iterator:

Iterates over features in a feature class

So for each point the model is executed once and outputs a file.


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.