post

Connecting Areas to Rooms with Dynamo

In this video I walk through how to find which Rooms are in a specific Revit Area. Using Areas to define space is a common workflow for many architectural projects and the OOTB Revit does not implicitly have a connection between Loadable families and Revit Area’s, however there is a good connection between Rooms & Elements. Using Dynamo we find all the Room location points that fall inside a Revit Area then update a Room parameter to reflect the Area ‘s number. Once that is done we can then schedule all families by Area using normal Revit schedules.
We first have to start by defining the space with one Area Type, in this case we used “Gross Building Area” however you can make your own. The really nice thing about areas is that we can run multiple different spatial configurations. In this model we are also running Light & Air Areas to do all the calculations. Ill review that workflow next,  below is the Area representing one Apartment on a floor that will have multiple rooms in it.
Here we see we have selected 4 Rooms in the same space.
We start with an Area Collector in Dynamo, This grabs all areas at a level and for a specific area type.
We then get the Rooms at the same level
We are going to do what is called a Polygon.ContainmentTest [native Dynamo] to find which Room location points lay within the polygon of each Area. We first have to break down the boundary line to points and then build a polygon. This is then used with poly contains node [remember to update lacing to Cross Product] and this in-turn s sets up a FilterBoolMask to get he Room elements that are within the polygon.
RoomsInsideArea.gif
We will need to prepare a list to do a SetParameterValue on the Rooms elements to update a parameter. To build a list of Area Numbers and Area name of equal length and nesting than what we are getting out of our FilterBoolMask, we need something called a List.OfRepeatedItem. We take the single readout of the area number and plug that to Item. Then we do a List.Count on the Room elements coming out of the FilterBoolMask [actually IN]. This will create a list that we can then feed into the SetParameter Node.
 RoomsInsideAreaMakeListssss.gif
The last part of the Dynamo workflow is to SetParameter of the Elements. This is pretty straight forward for each element from the FilterBoolMask the parameter values will be updated to reflect the Areas Number and Name to a parameter of the Room. Now each Room will have a value for the Apartment Number and Name it resides in.
In Revit then, make any Schedule of loadable families, but add the Parameters from the Room Element you set above with Dynamo, now you are scheduling by Area! If you have some elements not scheduling per Area try turning on the Room Calculation Point in the family.  This should work through nested families too.
 Thanks!
Share Button
  • DelphySidney

    Hi, i couldn’t find the Area collector function in the 0.75 dynamo version. Did i miss something?
    Thanks.

  • admin

    DelphySidney,

    Search the package manager for Blackbox, an area.collector is in there.

    Thx

  • DelphySidney

    Thanks so much for the swift reply.
    Just downloaded. Gona try out. Thanks for sharing.

    Keep on the good work!

  • Could this also work for defining a “zone” parameter in all family categories? Revit really needs a tool like levels to break up horizontal zones as well, but this might do the trick! How would it behave if an element is half in one area and half in the other?

  • admin

    Chris,
    Since Area elements in Revit are “by level” this should work. I’d like to see a use case for your question about one room in two different “spaces”? You could run multiple Area Schemes and make sure the room is captured in both area outlines. Just make sure when you are setting the Param you are not overwriting the previous info!

  • Stavros

    Hi, Great tutorial it is exactly what i was looking for. I am trying to get this working in Dynamo 8.1 and I am missing Room.Collector from Blackbox. Is there a workaround for this? Thanks for the great info

  • jason

    Stavros,

    Nathan Miller made an Area collector [Lunchbox], you can just swap his out for mine in the workflow 🙂

  • Stavros

    Jason, thanks for you reply
    I have followed your advice and with both Area and Room Collectors from Lunchbox it runs great. I have two more question if it is not too much to ask.
    1. Is there a reason to do this by Level? Both collectors from Lunchbox get data from all levels of the project.
    2. In your tutorial video you finish with the definition working incrementally on one Area at the time, could you give me some pointers as to how to apply on all Areas of the project. You refer to List of SubLists but my list management skills are very basic.

    Thanks so Much

Follow

Get every new post delivered to your Inbox

Join other followers: