# Selecting rooms

**URL:** <https://forum.dynamobim.com/t/selecting-rooms/28330>\
**Category:** Revit\
**Created:** [November 12, 2018, 1:56pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330 "2018-11-12T13:56:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![d.jansenMM3LJ](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@d.jansenMM3LJ](https://forum.dynamobim.com/u/d.jansenMM3LJ)\
**Post date:** [November 12, 2018, 1:56pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/1 "2018-11-12T13:56:00Z")

</div>

Hi all,

I’m trying to select all the rooms on a level. Which shouldn’t be to hard I would reckon, however I don’t get it to work. I filter more elements and lists like I did now, but somehow it is only returning a single room.

Any suggestions?

Thanks in advance!

 ![rooms%20per%20laag](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/8/886134eb831a39b045e3445bd547f5d9ec422d68.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kompolschek](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@Peter\_Kompolschek](https://forum.dynamobim.com/u/Peter_Kompolschek)\
**Post date:** [November 12, 2018, 2:02pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/2 "2018-11-12T14:02:40Z")

</div>

looks like you are iterating over a list of levels not rooms @ ListFilterByBoolMask

---

<div class="post-metadata">

**Author:** ![lucamanzoni](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lucamanzoni/32/56718_2.png) [@lucamanzoni](https://forum.dynamobim.com/u/lucamanzoni)\
**Post date:** [November 12, 2018, 2:21pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/4 "2018-11-12T14:21:56Z")

</div>

I think you need to use Cross Product Lacing for the String.Contains node. Can you post the graph with all relevant previews visible?

Also usually I do it this way:

 ![RoomFilter](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/5/75b97c39d4d1ca8598b46f18aed39f9a4b4ea004.png)

---

<div class="post-metadata">

**Author:** ![d.jansenMM3LJ](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@d.jansenMM3LJ](https://forum.dynamobim.com/u/d.jansenMM3LJ)\
**Post date:** [November 12, 2018, 2:26pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/5 "2018-11-12T14:26:37Z")

</div>

With Cross product on the String contains node I get 117 emty lists. So that number is correct but without input.  
I can also use the Spring node the select by category, but I would prefer more Dynamo native. That way other people don’t have to update their packages.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b308c410a88320f104df1319a4701baf1c8facfd.png)

---

<div class="post-metadata">

**Author:** ![d.jansenMM3LJ](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@d.jansenMM3LJ](https://forum.dynamobim.com/u/d.jansenMM3LJ)\
**Post date:** [November 12, 2018, 2:27pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/6 "2018-11-12T14:27:21Z")

</div>

I didn’t use the cross product in this capture btw…

---

<div class="post-metadata">

**Author:** ![lucamanzoni](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lucamanzoni/32/56718_2.png) [@lucamanzoni](https://forum.dynamobim.com/u/lucamanzoni)\
**Post date:** [November 12, 2018, 2:35pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/7 "2018-11-12T14:35:10Z")

</div>

Ok, what is wrong in your graph is the second Element.Name node (the one connected to rooms), because you get the name of the rooms, you should use instead String.FromObject.

Anyway I suggest you to use the graph I showed you, for the following reason:

- Your graph: select all the object on a level (+3000), compare them with room (+400)
- My graph: select all the rooms (+400), compare them with levels (5-10 maybe?)

As you can see, it will take less time to process it in this way.

---

<div class="post-metadata">

**Author:** ![d.jansenMM3LJ](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@d.jansenMM3LJ](https://forum.dynamobim.com/u/d.jansenMM3LJ)\
**Post date:** [November 12, 2018, 2:40pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/8 "2018-11-12T14:40:06Z")

</div>

Yes it took a long time to process with the cross product. You way is working fine! So I’m using that one. Thnks!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 12, 2018, 2:42pm UTC](https://forum.dynamobim.com/t/selecting-rooms/28330/9 "2018-11-12T14:42:18Z")

</div>

List.ContainsItem might be faster than String.Contains.
