Renumber rooms

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.

17 Comments on “Renumber rooms

  1. Hi there,

    Q. How can I get the room numbering to start at Room 01 and not Room 00.

    If you input a Precision value of 3 into the Code Block the room numbers starts at 001 but if you input Precision of 2 the rooms number start at 00. Is this a error in the script?

    Thanking you in advance

    Rob

    Like

    • Hi Rob. There is an input called ‘starting number’. It needs to correspond to the precision. For example, if you want 3 digits, enter 0.001 (or 0). If you want 2 digits, enter 0.01 (or 0).

      Like

      • Yes but the numbering starts with “.00” and not “.01” if you use a precision of 2 but if you use a precision of 3 you get .001 which is correct.

        Like

    • Dzung can you supply more info – what Revit version, Dynamo version and BVN package are you using? You need to use the latest version of BVN which is tested on Revit 2018 and Dynamo 1.3. Also check your geometry working range.

      Like

      • Hi Dzung. It works for me

        As I mentioned previously, you need to check you geometry working range. In Dynamo go Settings > Geometry Working Range > and set to Large. The script is looking for the rooms centre point and then the closest point on the curve to sort the rooms. Using millimeters causes issues with tolerance and rounding. This is why the Dynamo team introduced the Geometry Working Range. Generally if using mm, set it to large. It is annoying that no warning error pops up but I’m not sure I can fix that.

        Let me know if that fixes your problem.

        Like

        • Hi, Paul.
          Finally it works. Many thanks for your prompt response.
          Sorry that I skip the part ” working range” in your first reply. You can delete my unnecessary comment if need :). Thanks.

          Like

  2. estoy trabajando en este tipo de definiciones exactamente que es lo que tengo que seleccionar porque selecciono el room pero no me aparecen en watch todos los rooms y no se cambia.

    Like

  3. Hi there

    I can’t seem to get it to work

    Revit 2015
    Build: 20150303_1515(x64) update release 7

    Dynamo Core: 1.2.1.3083
    BVN: 1.5.2

    Any help would be great

    Like

        • Hi Oliver. Are you working in millimetres? Geometry Working Range is only available for Dynamo 1.3 and higher. Check out this blog post for more info: http://dynamobim.org/think-big-geometry-with-lots-of-zeros/

          Older versions of the custom node scaled down the geometry to perform the intersection as a work around. I removed this as Geometry Working Range essentially does the same thing. If you don’t want to update Dynamo, you’ll need to use an older version of the BVN package but I’m not sure which version I changed it in.

          Like

          • Awesome

            I’ll go try find the correct one then post here incase somebody else needs.

            Thank you!

            BTW nice work ! 🙂

            Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: