# Selecting doors and windows from room X to room Y

**URL:** <https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577>\
**Category:** Revit\
**Created:** [September 12, 2019, 8:28am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577 "2019-09-12T08:28:03Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 13, 2019, 11:00am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/22 "2019-09-13T11:00:43Z")

</div>

Also a new issue came to the surface:  
When I generate floortype X for room 1 and room 2, it’s fine.  
But after that, if I generate a floortype Y for room 3 it deletes the floors in room 1 and room 2… 😭

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 13, 2019, 1:01pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/23 "2019-09-13T13:01:34Z")

</div>

Topmost group ends with a List.MaximumByKey. Might ha e the node wrong as I am on mobile and can’t zoom enough it’s the last node though.

Swap that for a List.SortByKey (you’ll need to add a Surface.Area as the key), a List.Reverse, and a List.Decompose. List levels will matter for all of these. The first items are the larger polycurves which make up your outer boundaries. The rest are interior loops.

You should be able to figure out where to go from there.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 13, 2019, 1:06pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/24 "2019-09-13T13:06:12Z")

</div>

> [@Laura\_BIMChick](#):
>
> When I generate floortype X for room 1 and room 2, it’s fine.  
> But after that, if I generate a floortype Y for room 3 it deletes the floors in room 1 and room 2…

This is element binding, and only an issue if you let it be.

> [@Element Binding in Revit](https://forum.dynamobim.com/t/element-binding-in-revit/31612):
>
> Element binding is the name given to the process which Dynamo manage to ‘track’ the items created in non-Dynamo files. In this case, I’m going to focus entirely on element binding as it refers to Dynamo for Revit, but the mechanism exists to allow for this behavior in other applications (advanced steel, fusion, alias, etc.) as well. In the context of Revit, ‘elements’ refers to anything with an Element ID in the Revit database. When utilized correctly, element binding will expand how you leverag…

Not sure if there are any spots left, but I am giving two bigger dives into this topic at AU Vegas this year. Search for Pandora’s Box if you’re interested.

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 13, 2019, 1:32pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/25 "2019-09-13T13:32:01Z")

</div>

@jacob.small  
Great, I completely understood your article about element binding and fixed it by deleting the bindings in notepad and now I can create multiple floor types for different rooms.  
Unfortunately I don’t think I’ll have the time or money to go to Vegas any time soon (I’m from Europe). But I’m taking a local dynamo-class next month. 😂

I’ll try out the suggestion for floor openings and get back to you if I’m stuck!

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 13, 2019, 2:19pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/26 "2019-09-13T14:19:58Z")

</div>

@jacob.small  
So far, I only managed to cut out 1 freestanding wall.  
I don’t really get why it’s not doing both…

 ![Capture16](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/b/5bb46118fd23a440b1be0c5eab6e22f1b69be1d4.png)  
 ![Capture17](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/3/63aa4a761d3cf6eee44f21c793ea0b2590e4d0fd.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 13, 2019, 6:04pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/27 "2019-09-13T18:04:35Z")

</div>

Likely list levels - also I am not sure if this will process two openings in the floor.

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 13, 2019, 6:51pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/28 "2019-09-13T18:51:51Z")

</div>

If you have rooms (you have) in the model it will follow the contours of the walls, thats a good start .

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 16, 2019, 6:14am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/29 "2019-09-16T06:14:37Z")

</div>

It was the list levels, I messed around with it a little bit and this was the solution:

 ![Capture18](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/f/8f924bdc8b228fbf4640c3cf04d1ee1d723303e3.png)  
Now it generates openings for all the freestanding walls! 🙂

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 16, 2019, 7:24am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/31 "2019-09-16T07:24:00Z")

</div>

@jacob.small  
I wanted to try adding 1 more thing, to create a floor at the room level but with a (negative) offset. But this node seems to not accept a negative offset like for example -200…  
 ![Capture19](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/5/d5418bbd228e5d4626b7dfc51cfedddafb3cdc34.png)

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 16, 2019, 7:47am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/32 "2019-09-16T07:47:37Z")

</div>

Solved it with this:

 ![Capture20](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/f/7f74111876176093af7b7dbfd0fdc5a24ea5bfb8.png)

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 16, 2019, 4:14pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/33 "2019-09-16T16:14:01Z")

</div>

@jacob.small Just 1 last thing (I promise)  
I also wanted the threshold of the windows that are sitting on that floor level…

 ![Capture21](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/b/eba220e786e94480a59ba0655d393635cabdc978.png)  
I modified the ‘get threshold from doors’-part, but I don’t really know how to connect it to the List.AddItemToFront-node in the group called ‘Adds the room surface to the threshold surface’… Do I just double that group and in the first I add the door threshold and the one after that I add the window threshold? Because merging the 2 lists is probably not going to work…  
 ![Capture23](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/4/a4f5678b83ff53e5f9b650d0927e4de047631dbb.png)

Also the trick is selecting the windows by room, since the windows are not hosted in the wall bounding the room, but in the outside wall that is separate (but they are joined)… (that’s how our office models) Any idea’s?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 16, 2019, 10:32pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/34 "2019-09-16T22:32:05Z")

</div>

> [@Laura\_BIMChick](#):
>
> (that’s how our office models)

Icky iky ick ick. That’s like bubblegum under a table at a restaurant for me - avoid at all costs… I know why some do though, so let me see what I can come up with.

Can you post the current dyn which shows how you are currently working with the windows. I’ll also need a .rvt that has stuff modeled per that two wall standard. You can just say ‘the old one is how we model stuff’ if that’s accurate, but then again my old method did grab windows in the rooms so I am guessing not.

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 17, 2019, 6:17am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/35 "2019-09-17T06:17:49Z")

</div>

> [@jacob.small](#):
>
> Icky iky ick ick. That’s like bubblegum under a table at a restaurant for me - avoid at all costs…

Hahaha I completely knew this was going to be your response! I actually had a meeting about modelling like this yesterday 😂

But, here is my progress on getting the windows, just don’t know how to add/connect to the rooms like the way you did with the doors…  
[FloorByRoomOptionalOffsetIncludingWindows.dyn](https://forum.dynamobim.com/uploads/short-url/ZnkleuSictSXtOZ1VG6V969aBA.dyn) (235.6 KB)

Revit for testing:

> **[WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free](https://wetransfer.com/downloads/776266b43ac539186e24f1ea290c506320190917061639/71436e)**
>
> WeTransfer is the simplest way to send your files around the world

(for now only testing in room called ‘badkamer’)

**EDIT: I also still need to change the part about getting the width of the window’s host, because of the different modelling, I need the width of the other walls and not window’s the host wall…**

**And also not the complete width, only up until the window**

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 17, 2019, 11:38am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/36 "2019-09-17T11:38:21Z")

</div>

@jacob.small  
Small update: I managed to get the depth of the separate walls to get the distance to the window! (got the walls by joining them to the host and then get joined elements)  
[FloorByRoomOptionalOffsetIncludingWindows.dyn](https://forum.dynamobim.com/uploads/short-url/7BULgHe5s6zr8nNBaqw2LuGNGqP.dyn) (257.7 KB)

Still struggling to connect to the surfaces though…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 17, 2019, 11:57am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/37 "2019-09-17T11:57:41Z")

</div>

Good work!

I have a fairly busy day, but I’ll set aside time in the afternoon or early evening to have a look.

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 17, 2019, 12:03pm UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/38 "2019-09-17T12:03:33Z")

</div>

@jacob.small  
Thanks! I feel like I’m so close but nothing is working

 ![Capture24](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/d/9db2042c5246bd4fb0cb19a0a7350cf64b9b76d2.png)  
(tried joining window threshold and door threshold before combining with room surfaces and it seems right but when I run, no windowthreshold…)

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 18, 2019, 6:02am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/39 "2019-09-18T06:02:13Z")

</div>

Still no progress… 😖

 ![Capture25](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/c/acb51bd0bf66c95d78b07ea5dadf2bfabc815b14.png)  
In the model it just doesn’t generate the window threshold…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 18, 2019, 7:37am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/40 "2019-09-18T07:37:48Z")

</div>

Was a busy day so I haven’t had a chance to look at this. I’ll try to find time tomorrow.

---

<div class="post-metadata">

**Author:** ![Laura\_BIMChick](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@Laura\_BIMChick](https://forum.dynamobim.com/u/Laura_BIMChick)\
**Post date:** [September 26, 2019, 6:25am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/41 "2019-09-26T06:25:48Z")

</div>

@jacob.small Still no progress on my side…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 27, 2019, 4:36am UTC](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577/42 "2019-09-27T04:36:29Z")

</div>

Sorry - been super tied up of late. Downloaded the files and will have a look at it this weekend.

[Previous page](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577.md?page=1)

[Next page](https://forum.dynamobim.com/t/selecting-doors-and-windows-from-room-x-to-room-y/40577.md?page=3)
