Repeat a process for each room

I am trying to calculate the distance between two slabs and set it as parameter in the room properties.
I have done it for one room, now I should repeat it n-times depending on the room numbers that can change according to the project.
How can I repeat the process?

Would removing your list.getitematindex after the room elements collector do the trick? No?

1 Like