Data structure for points and lines

hello everyone.

I am trying to make a script where when a user constructs a window on revit, it automatically gets you a point in front of a window and makes a triangle between that point and two other points from the lower window corners.

I was able to achieve it and it worked however when I added more windows on Revit and pressed Run, it became like an image below. It seems like I’m not organizing the data well that its not modular.

Is there a way to organize your data so that it can be modular? thank you for your help.

Windows.dyn (33.0 KB)

Hi @mrkpkimEMSRM,

Is this your goal?

Windows V2.dyn (50.7 KB)

Yes that’s exactly what I was looking for.
However, it didnt work on my end for some reason. I tried to download your script and just run it but it shows something like this with lines going endless.

I also tried to implement it into my script but it also gave me the same result…
not sure what I’m doing wrong that I’m not seeing what you uploaded above. just clean simple triangles.

The units of my example are millimeters.
Change the offset distance according to your units (i.e : -5 for meters instead of -5000)

Thank you!
but it still seems like it’s not as clean as yours. Its still getting tangled for some reason…
I checked the lacing and everything. not sure why this is happening…

It’s only a matter of lacing and list structure.

Windows V3.dyn (54.8 KB)

Oh thank you it seems to work now with V3 - thank you very much.

Was there a big change between V2 and V3?

Hello, thank you very much for the help above, I truly appreciate it.

Its working perfect for a set of windows with the same size but it seems like its giving me an error when I include a window that is not the same size as the others.
Do you perhaps know what is giving me this error? thank you in advance.