Grasshopper Archicad, distribute windows in facades

I am a beginner in working with grasshopper. I would like to distribute archicad windows in archicad walls with grasshopper. I have been able to create a simple script with the help of some tutorials, this also works for one wall. However, I would like to make this function possible for many different walls, even several houses for example. If I select several walls to be processed by the script, the distribution no longer works. The windows are then distributed in an uncontrolled way. I assume it is because all walls are transferred into an overall curve at the beginning. Is there a way for grasshopper to consider each wall/curve separately, even if they are all selected at once?!
Thank you very much for your help!

windows 10, archicad 25, Rhino 6

distribute windows in walls|690x315

Here you go^^
Use graft tree component in the beginning of your script, if you want grasshopper to apply your script to every single input data(walls in this case) separately.

oops *division


wall division archicad.gh (18.5 KB)

That’s great! Thank you very much!


Thanks for the quick answer, I would never have expected that… I would like to ask further questions now, please. In my first attempt, I arranged the windows from the centre in the wall (these are the deactivated components in the picture). I can’t manage the combination with your wonderfully working script. How could this work?
Very kind regards

Hehe can’t wait for you to check this out >:D
Maybe there are better solution for this, but here is what i did:
wall division archicad#2.gh (15.2 KB)

p.s you have to understand, that i just fixed up your script. Using this method you will get duplicate window in the center.
p.s.s you can fix this, using this magical node:

Thank you, that works great! I hope to be able to understand it completely soon. I don’t understand some steps yet, but I will… hopefully. In any case, it’s a lot of fun. Thanks and greetings

You are very welcome!