Switch order of lists

Hi Dynamo-experts, an easy question for you!
I’m having a list of rooms and I know what the surrounding elements are.

You can see that some walls are linked to both rooms. So what I now want to do is have a list of each surrounding element (in this case the walls) and to which rooms they are linked.

Something like:

wall (345434)

  • room (347124)
  • room (347127)

wall (345435)

  • room (34124)

How can this being done?
Thanks!

You need to duplicate the rooms for each wall first. Then you can group them by bounding element.

3 Likes

An alternate approach …

c = List.Flatten(a,-1);
d = List.UniqueItems(c);
e = List.Contains(a<2>,d<1>);
f = List.FilterByBoolMask(b,e<1>)["in"];
g = List.Transpose([d,f]);
4 Likes

Hi Vikram,

What are you using here?
Doesn’t look like Dynamo.

Regards,
Atharva

This is one of the daily builds (beta) for Dynamo 2.13, which you can try for yourself by unpacking one of the latest zip files from here: https://dynamobuilds.com/

3 Likes