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. 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, the Parametric Monkey Dynamo package offers the ‘Room.RenumberByModelCurve’ custom node. 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 of 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 centre of the room and that room elements are centred within the room boundaries. This is because behind the scenes, the script is collecting all rooms 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 on a hidden workset for example, for future modification.