Execution of a script with a loop

Hi everybody,

I’m currently working on a script which give me the exact perimeter and area of my room boundaries (Without doors, windows and room separation line, …). The script is working perfectly but only for one room …
The script is gathering all the room in the models with the nodes “Categories” and “All element of categories” so if I run it on a model with multiples rooms, all my values are falses.

I guess that the easiest way to solve the problem would be to execute the script for on room after an other but I’ve no idea how to do it. I could use a “Select Model Element” node and run the script on each room but it wouldn’t be very efficient …

Here is the script :
Métrés finitions.dyn (36.1 KB)

Thanks you for you help !
Nathan

@Nathan_Nivill Unable to run your definition as you have Custom nodes

However, yours seems to be a Lacing issue. Explore other lacing options on your nodes and if required, Levels (in the nodes)

Thanks for your answer, I manage to solve my problem.
I still have an other issue …
If a room of my list has no windows for example, Dynamo gives me an Empty List of windows for that room. So no problem about that but if this is the first room of my list I have an error. In english it’s something like that :“Suppression of the reference of a non-pointer element”.


But It works perfeclty if it’s an other room of my list.

Any idea how I could solve this problem ?

Thanks !