Creating multiple rectangles based off of model lines selected within Revit

Hi I want to be able to create closed rectangles based off of model lines created in Revit.
I have selected the model lines and I was able to show them within Dynamo, but they are currently showing as lines, rather than rectangles. I want to finally feed them into the Refinery toolkit to optimize other predefined rectangles within the rectangles shown.

Hello @tj3GXAA and welcome to the forum…not sure do you mean something here ?

1 Like

Hi @sovitek, thanks for your help on this. That looks to be just what I need.
Can you tell me where to find the “group curves” node is, is this within a separate package?

Hi @tj3GXAA this one is from archilab package…ps. keep in mind that package is version specific…and just upgraded for 2024

Hi @sovitek , thanks for your help it worked perfectly.

Hi @sovitek,

Thanks for the above information but when I plot the rectangles as per the script above, it throws up some errors. Depending on how I select the rectangles in Revit (right to left or left to right it gives me different results each time.
Please see issue I’m having below where I have drawn one rectangle and copied it twice to the left. Rectangle 2 doesn’t input the corners points in a loop thus creating a null.

1 Like

Hard to see what came before the Curve.StartPoint, but my guess is Instead of building a rectangle, build a polycirve from the grouped curves. That might work as is, but if you need the rectangle object type, explode the polycurve, and pull the start point from each of those curves.

1 Like

Hello yeps try something here…