Selecting rooms

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!

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

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:


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.

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

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.

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

List.ContainsItem might be faster than String.Contains.