Rename rooms by groups
A common task that we are often asked to undertake is scheduling apartments for residential projects. In my opinion, the generally accepted method for modelling residential buildings is to use groups for each individual apartment layout. These groups, which contain only the internal partitions, are then placed into the main model which contains all the party walls and structure. Depending on your preference, rooms can either be placed within the model group, or outside of the model group. Since it is not necessary to schedule every single room within the apartment, the internal partition walls can be set to ‘non-room bounding’, and a single room is placed within the apartment. The problem therefore arises in that there is no association between the model group and the room in which it resides. Ideally we want to keep these two in sync. For example, if I name the model group ‘1B-6.0’, I want the room’s occupancy parameter to update.
This dilemma is discussed in David Light’s post ‘Scheduling Apartments‘. Since Revit is unable to schedule groups, David proposes a solution whereby a hidden element within the group is tagged and scheduled. But the limitation with this method is that it is unable to extract the area of the room. In order to do this, we need to use a room schedule. To manually sync the room parameters to the apartment group parameters is a massively time-consuming process. However, luckily we can automate the process with Dynamo.
The ‘Room.RenameByModelGroup’ node, which is part of the BVN package, solves this problem. To use this node, first ensure that all rooms have the correct volume by adjusting the limit offsets. If a room overlaps into another above, the script will be unable to determine which room the model group actually belongs to. The ‘Room.AdjustUpperLimit’ node can help to adjust the room heights if required.
The node then extracts all model groups and filters them by ‘String.StartsWith’. So for example, if you enter “1B” it will return model groups called, “1B’, “1B-1.0”, “1B XYZ”, etc. The script then collects all rooms using the ‘Lunchbox Room Element Collector’ node. Then using Clockwork’s ‘Room.IsPointInside’ node, a series of Boolean filters are applied to determine which model group resides in which room. Using the name parameter from the model group, the room’s ‘Occupancy’ parameter is updated. The room’s ‘Name’ parameter can also be updated by adjusting the input.