Get Existing Room Adjacency By Level

how to do recursive do this for each room.dyn (15.2 KB) Project1.rvt (1.5 MB) This is a 2020 file

The attached .dyn works with the attached .rvt to create a list of adjacent rooms to a single room. I have failed at every attempt to do this for each room. Any help is appreciated :slight_smile:

Where I currently have “List.FirstItem” I think I need to loop over the entire list of the “Room.CenterBoundary”…? I have tried “List.Map” but this appears to not produce an output for each, only the first list.

Thank you in advance if you can put me on the right path.

Fails

Fail2Fail3

So you want to know if a room boundary edge intersects with itself or the first boundary edge from any other room? I think your question (which only you can answer) should be why you would want to do something so aimless in the first place.

The goal is a list of all adjacent rooms for each room. Perhaps my approach is entirely misplaced…

It is unfortuntately. The best way to solve your problem is to think about how you would do it without Dynamo - understand your own decision making process to establish adjacencies, then abstract it and think about how you could codify it into a sequence of instructions (computational thinking) which can be created in Dynamo (via nodes).

In case there is a misunderstanding, I do not wish to generate rooms with set adjacent requirements but rather to extract the existing state.

Thank you for the input.

Try 'geometry intersect" with lacing xxx, then remove ‘list first item’ and connect ‘room.centerboundary’ directly twice with geometry intersect. I am not sure but the next thing i would do is set '‘list contains’ to lacing longest.
Good luck

1 Like


RoomAdjacenciesByLevel_Version0.0.dyn (19.6 KB)
Project1.rvt (1.5 MB)

It Worked!

Thanks to @blou ! You are a BAD AZZ for taking the time to read and offer a hand, Thank you!:star_struck:

1 Like


RoomAdjacenciesByLevel_Version1.0.dyn (10.1 KB) Project1.rvt (1.5 MB)

A second & different method that works!

Thanks to @DeronEdge for finding @viktor_kuzev post (https://forum.dynamobim.com/u/viktor_kuzev) using @Julien_Benoit1’s SteamNodes “Tool.GetSurroundingElements”

A third Solution
https://thebuildingcoder.typepad.com/blog/2013/09/room-neighbours.html

Again thanks to @DeronEdge for finding this and @jeremytammik for the post

the pierce through and find method, there should be a node for that, anyone?