Elements in Room, false result

Dynamo_Elements_In_roDynamo_Elements_In_rooms_2020-04-20_01-18-00 oms.dyn|attachment (39.9 KB) Uploading: Test_Referenced File.rvt…

Hallo everybody,
I have a problem with my script that I can not solve. I am trying to find Elemnts in Rooms (Rooms from a Linked File) and as a result I get the wrong values. I am getting the Room number of rooms on the same level but not the correct rooms. I have checked the Projekt Coordinates and everything is fine, I can not figure out where the problem is. Any help would be highly appreciated!
I have linked the dynamo script as well as a small part of the project for testing. Thank you in advance!

Hard to tell without seeing any of your outputs, but it looks like you sort your elements by room (Elements in Room) but then write the parameter value back to the original order. You may just need to use the sorted list as the input for SetParameterByName.

Hey Nick thank you for you quick reply! My problem is that “Elements in Room” returns 34 results but my list of room has 37 Elements? I use the Elements in Rooms list to get the rooms, so when the list have a different length the bool mask picks up the wrong rooms…

Elements in Room should group your list of elements by the room they’re in. It should have the same list length as your elements list, not your rooms list, assuming all the elements are in valid rooms. It should have a total number of sublists equal to your number of rooms though, which should make your boolean mask lineup. Can you show us your node previews and explain what your python code is doing?

The python script writes a list of true and false for full /empty list. But as I said I get as an output from the Elements in Rooms, 34 Lists, some with elements some empty but not 37…………


Some of the rooms may not be placed. Try checking something like Area from the rooms first and filter any that are unplaced.

1 Like

Nick !! Just perfection !! Haven’t thought about checking if they are placed ! That was the problem!! Thanks a million for the help ! Really appreciate it !