Resizing an element

How can I resize an element (window) that I created based on the size of the environment area … Here in my city all windows should have 1/6 of the floor area … I created a condition that shows me if the window is smaller than the size of the environment area … And it is returning me a value of ‘true or false’ … How can I do to resize the width or height of it if its size is less than necessary?Capture

With Element.SetParameterByName you can set “new” values.
I guess you have to first create a copy of your window and rename it.

1 Like

copi and rename in revit or at dynamo?

In this case it would be with Dynamo controlling Revit. So both.

1 Like

I have managed to change the value, however I only wish to change if a statement is false …
Example: I have a window with 0.144 m² but it has to be at least 0.92m², I want the Dynamo to change its height if this measure of X> Y is false.

You have to work with List.FilterByBoolMask and you must feed the copied window in “element” from List.FilterByBoolMask.

1 Like

Thanks, I got it, now it only takes one more step if you can get a chance on me … For example, I was able to replace the height of the window if the value of your area is less than 1/6 of the floor area … But I could only change the height, wanted to create a loop so that it increases proportionally the Height and Width by reaching the objective …
Is LoopWhile the best option?

I am not familiar with Loop while but i guess you must determine what the values must be, on your conditions.
As i understand you well you want the width - height change in ratio you know the desired 1/6 floor area and the window area this is also a ratio -> multiply this last ratio to the width and height of your window (you can even use Math.Round), and feed this in the Element.SetParameterByName.

good luck