RTV Tools

Thursday, June 4, 2015

Collect Elements in Rooms Across Linked Files, and Write Room Data Directly to Elements or List to Excel

 Update: My latest implementation can be downloaded here.

Its a long-winded title, but its only one Dynamo node... Just added to the Bakery package, called Collect Elements in Rooms and Show Detailed List. Basically, it takes a list of Rooms and a list of Elements and then tells you which Rooms those Elements are in. It also works across linked files, so you can have a fixture model, link in the Architectural containing Rooms, and use those to do the comparison.

Once we have the Room that an element lives in (mostly thanks to Konrad's work on Family.InRoom, which I have altered a little bit here), we can do lots of things. I used a Cycle and LaceShortest to get a 1:1 list of Room:Element. This makes it easier to do things with the resulting combined lists. Like, one of the outputs of the node is a detailed 6 index list, which can be directly exported to Excel. The list in Excel can then be filtered by Room. You can choose two parameters from Rooms, two from the Elements, and it also gives you the Element Ids of both:

I could have added headers to the list in Dynamo, but I didn't do it for this first version (yet):

We can also take a parameter from a Room (like Room Name or Room Number) and then write it directly into a parameter in the Elements, like this:

This shows the Mark parameter populated with Room Name:
Or, we can take two parameters from linked Architectural rooms, and drive two Shared Parameters in every element in the current model. I ran the following node to set parameters for about 2500 elements in just a couple of minutes:

Or, we can use another Bakery node to do a wildcard search and collect elements from one Category across multiple links, and then check against these:

While this is a basic implementation at this stage (and no doubt there may be some hiccups), it demonstrates a powerful concept: to be able to take a mixture of linked Rooms and/or linked Elements and determine their relationship, then export that data or use it to instantly drive other parameters in Revit.

Goooo Dynamo!


  1. It looks like "Collect Elements in Rooms and.." node has a custom node called "Element Ids" Do you know where I can fine that? Im pretty new to this.


    1. That nodes is from archilab package, Archi-lab_Grimshaw.Element Properties

  2. Hi,Luke.
    My time has come to start with dynamo.
    According to your ways to get why is an empty value?
    Thnx for the help!

    1. Not sure, can you give some more information about what is going wrong?

  3. Hi,

    I guess this is working only with elements containing "Room Calculation Point", isn´t it?

  4. No, it works with any component family that has an origin point.

  5. Hey Luke,
    I've been playing with above Dynamo sample. Initially, I was not getting all of the above ceiling elements (VAV's, etc.)... I finally realized that I needed to turn off the "Room Bounding" setting on the ceiling and bah-da bing!

  6. Luke, great post!
    Is there anyway for your 'Collect Elements in Rooms and Show Detailed List' custom node to use system families as elements? I'm trying to figure out a way for rooms to find adjacent ceilings and possibly walls and (finish) floors. In my attempt to grab ceilings, I've tried calculating room volumes and turn off 'Room Bounding' in the ceiling parameters but nothing seems to work. Can it be done?

  7. How could I get it for spaces what I would need to change?