Placing distance lines between two elements in different room

Hi :slight_smile:
I am trying to place a line between two families in the same room, but dynamo places it randomly! any ideas :slight_smile:

You’re getting all elements of category in the entire project.
You’ll have to filter them by room first.

hej viktor
i am trying to filter by room bu the problem that i can make the families understand that their location in the that room

There is a node FamilyInstance.Room in the Rhythm package:

1 Like

Hi again,
I guess you misunderstood me! what I am trying to do that I would like to check the distance between to elements or families, as you can see at the picture, I would like to check the distance between the door and the electric equipment in each room?


thanks for replying :slight_smile:

I think I understood it right from the start.
If it is in each room, you have to get them by room. Because if not you’re going to draw lines between elements in different rooms, right?
So that node is going to help you find which element is in which room.

I am trying to do it in the same way as you said but still getting the locations not in order

You have to get the rooms of each element so you can group them by room. Right now you’re comparing a random list of electrical equipment with a random list of doors.

same result :confused:

That’s because you’re using the same list of rooms for the keys. You need to use the room of that specific element.

it because both of the elements located in the same room!!

But you don’t know which room. Dynamo lists objects in order of Id. Right now you have no relationship between the elements and the rooms. You just have lists of all electrical equipment, all doors, and all rooms. There is nothing tying those elements together so grouping them by the same list isn’t changing anything. You need to get the room from the equipment and the room from the doors and pair them up.

okay :slight_smile: i will try to do it, so it seems the other way around :confused: also i am not sue if there a node call get room by element !!

Also, don’t flatten the list after GroupByKey, you’ll just erase the grouping.

you are right, however still the same result, creating them randomly :confused:

If your rooms are in a linked model you’ll have to get a little creative. You’ll probably need Python or a geometry check.

1 Like

Try using the FamilyInstances.Room node from the Rhythm package and group the elements by room:

yes it’s :frowning:

same same, i guess as Nick_Boyts says, it could be because of liked model !?

Which elements are in your model and which are in the linked model?

You can use Linked model nodes from Archilab or GeniusLoci, or you can probably copy/monitor the elements into your model