Get element room location from linked file

Hi all, i am trying a Dynamo script that get the location (room name) of all electrical fixtures and lighting fixtures from linked architecture
till now i have got all room names from linked model and i got all fixture included in any room,
the problem that i could not group the fixture with a key of rooms i need when i call a fixture to know the related room location, is that possible, can anyone guide

Use list levels.

If you scroll down your Elements in room node you’ll see different lists. Each list will correspond to a room. Your lists should be 0 - 316 (one list for each room).

When you create your dictionary you need to point it at the right list level.

thanks alien for your reply,
this is the problem some rooms dont have fixtures so not all rooms listed, and i dnot knnow which index represent which room

Hi,

sounds like you are trying to do something that @GavinCrump describes in great detail in the following link.

2 Likes