As architects, we commonly find ourselves faced with a large number of rooms on a floor plan that must be numbered sequentially based on their layout. As William Wong points out, this type of data is not easily manipulated within a tabular format of an Excel spreadsheet nor a Revit schedule. We need to see the spatial configuration of rooms in a plan in order to understand how the renumbering needs to be applied.
To solve this problem, I’ve developed a Dynamo custom node, which is quick and free to use. The ‘Room.RenumberByModelCurve’ custom node is part of the BVN package, which can be downloaded via the Dynamo Package Manager. Users are required to draw a (model) spline through the rooms to be numbered. Only rooms that intersect the curve will be processed. This allows for batch processing which is often desirable. The number sequence precision can then be set. For example, a precision on 1 will result in 0, 1, 2 etc., whereas a precision of 2 will result in 00, 01, 02, etc. An optional prefix, such as the level number, can also be set. There is also the option to exclude certain room names which cannot avoid being intersected by the model curve, such as circulation.
To ensure accuracy, ensure the spline passes approximately through the center of the room and that room elements are centered within the room boundaries. This is because behind the scenes, the script is collecting all rooms using the ‘LunchBox Room Collector’ node and extracting their location point. Using this point, the script evaluates the closest point to the curve. These points, and the associated rooms, are then sorted based on their curve parameter. A sequence of numbers is then created and converted to a string to avoid any precision issues. This string is then concatenated with the desired prefix. The model curve can then be deleted or retained for future modification.