Selecting doors and windows from room X to room Y

Realized I forgot to post this on Sunday (or super early Monday morning really).

FloorByRoomOptionalOffsetIncludingWindows - Modified.dyn (288.7 KB)

Working with windows which aren’t hosted by the bounding elements requires quite a bit of a change in both the initial gathering and the sizing of items. Instead of getting the elements hosted in the boundaries, we just get the windows associated with the room using a Room.Windows node.

Anyway, once you have the window’s selected using a Room.Windows, you want to filter out windows which have a real sill not a floor. For this I used the Sill Height parameter to build a filter, but you’ll know what is best for your office’s modeling methods. Next build a coordinate system from the facing orientation of the family as you were before, but don’t use a Rectangle.ByWidthLength that requires a CS, as you’ll want to shift the rectangle into place on the origin so it hits the floor correctly. Instead build a rectangle by just the width and length, where the length is the width of the door (yay coordinate systems!) and the length is the distance from the widow’s insertion point to the room’s bounding polyline. Finding that distance does shift the ‘major’ elements of the garph around a bit, as you need to find that polyline before you can find the window threshold. It’s doable though. Next you need to shift the rectangle by 1/2 of the distance from the room boundary to the element so the edge sits on the origin point (the original rectangle will draw on the origin). You can then use a Geometry.Transform node to shift the thresholds into the correct rotation and location. It all looks like this when you’re done:

This change in concept also extended to doors, as they’d be in exterior walls which would have a sub-wall behind them just like windows, so you’d have to edit that section too. So anyone who uses this… method of multiple walls to make a single wall will need to be cognizant of this fact in the above graphs and modify accordingly. Remember you still need to keep the to/from room filters though. Looks like this when you combine the two:

Ok from there you have to join the two sets of thresholds (windows and doors) into a single list, and then transpose and then flatten them so you’ll have a list thresholds grouped by room. From there it is more or less the same as before.

You may also want to consider leveraging some element binding on this instead of using a ‘delete old floors’ method, as that could cause some headaches with lost data if you had parameters filled out in the existing elements.

Best of luck!

3 Likes

@jacob.small Thanks, I understand most of it, and I’ll look into the element binding.
But when I run the script I get multiple errors, starting with this one:

Likely because not all rooms have windows. Not much we can do about that one I am afraid.

@jacob.small Okay so it should still create a floor? Because that’s not happening…

Thought it would… you may need to add a List.Clean node with a false son the preserve indices inout in after joining the door and window thresholds. Otherwise a null result could be blocking another node upstream.

Okay, it may be something else, it doesn’t find any windows in the room at all… I’m getting an empty list from the room.windows node…

Do you have Room Calculation Point turned on for your windows?

Don’t know what that is, but previously I got the windows from outside the room, because they are not in the room because they are modeled in a wall outside the room, right?

But I fixed it by getting the windows how I previously got them, only other issue I found is that the doorthreshold is only generating ‘half’…

This will help for the gathering bit. It’s quick and will enable other features within your larger workflow.

Not sure why you are only getting half exterior doors. Try removing the portion which shifts the initial rectangle by 1/2 of the distance to the floor.

Removing it didn’t work, but I messed around with it and now it works!

1 Like

@jacob.small


I tried adding a second window with sill height = 0 in a different wall
And dynamo seems to be getting the geometry and all, but it’s not creating the window threshold in my model…

Any ideas why? Is it lacing? Is it list levels? Is it both? :face_with_monocle::face_with_raised_eyebrow:

Upload the Revit file to a share, and the current dynamo file as you’re using it so I can look it over. Without those things I don’t have enough to review.

I likely wont’ have time to check it out until Sunday night as an FYI.

@jacob.small


FloorByRoomOptionalOffsetIncludingWindows4.dyn (300.7 KB)
I’m going to be out of office for a week so I won’t be responding immediately! (yay holiday!)

@jacob.small any luck?

Sorry totally slipped my mind. I’ll have a look when I get home.

No problem, I did some extensive math at the bottom of the graph to get the depth of the window threshold a certain way so that we can have floor finish 2cm past the window frame but you can take that temporarily out if that would be easier…

1 Like

@jacob.small don’t really want to revive this post but I’m just here to share my progress.
After more then a year I decided to work on it some more and got it to work!
Since I was testing on a 2019 version I also converted it to 2021 version for 1 of our projects. Don’t know what it will do in 2020 version. I might try this myself later this week.
It still might need some tweaking depending on the parameters in the families you are using but it works damn good for me.

1 of the elements I had in an earlier script is that there were floor openings created for the freestanding walls. This meant the freestanding walls needed to be room bounding but this gave some extra complications with the room boundaries and using them for the floorsketch. To make it simpler for now (and because our current projects don’t have freestanding walls) I left it out. The workaround for now is to make the freestanding walls NOT room bounding. The downside of this is that the area of the room also counts the area under the walls (but you can solve this with room boundaries) and you still need to join these walls to the floors so that the floors are cut out correctly (we already have a script for this).
I will probably work on this some more in the future and if I ever find a solution I’ll post it here again.

Or if someone still wants to help I’m thinking the freestanding walls need to be filtered out after this node (all the way on top side of graph), before the curves/boundaries are created for the floors. Don’t know how, for now I’m thinking via an extra parameter, but I’ll look into it in the future, but other suggestions are still welcome.

Version 2019
FloorByRoomOptionalOffsetIncludingDoorsAndWindows_2019.dyn (322.1 KB)

Version 2021
FloorByRoomOptionalOffsetIncludingDoorsAndWindows_2021.dyn (376.7 KB)

Enjoy :slight_smile:

1 Like

Hey Laura do you by any chance still have the revit-test file?
I really want to test out your script, but there are several parameter names in dutch?
So don’t know what to replace them with.

@jacob.small

I’ve been testing on another project and with new window and door families, but something seems to be going wrong while transponding here because the order is all messed up. There are empty lists in between because there are rooms that have no windows…
But it is adding the window threshholds to the wrong rooms or something. In the model I get seperate sketches for the window thresholds…



I might be to close to it because I’ve been working on it non-stop, do you know by any chance what is going wrong here?