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.

22 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

    • 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).

      • 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.

    • 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.

      • Hi Dzung. It works for me

        https://www.dropbox.com/s/oqj3ceizrbyvsrc/Dynamo_RenumberRooms3.png?dl=0

        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.

        • 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.

  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.

  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

        • 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.

          • Awesome

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

            Thank you!

            BTW nice work ! 🙂

  4. Paul,

    I am using Revit 2017 2.2 and Dynamo 1.3.2.2480. I downloaded the BVN Package this morning and I can not seem to the node to work. I dug into the node a bit and noticed that there is an error in the get phases section of the script. The element.id after the Get.ParameterValueByName is null and seem to be causing the the null list of rooms. Can you check into this or perhaps let me know if I am missing something. I have recreated the script exactly as you have posted as well as checked the Geometry Working Range.

    • Hi Chris. The get phase nodes works on the current view – Are you running the script in a floor plan? It might fail if you try and run it in say a schedule or something like that. Also, have you refreshed the boolean toggle input – if this doesn’t run, Lunchbox won’t collect any rooms. If it still doesn’t work, can you send me the file and I’ll take a look – paulw@parametricmonkey.com

      • I am running it from a plan which is the only view open in the file. I will email you for further assistance.

  5. Hi, I’m having an issue with the numbering, for some reason I’m getting alot of 0’s, I have Number Prefix: 1.10, Code Block: 3, Number: 0.001, and it is renumbering my rooms at 1.100000001, I need it to start at 1.101, how can I accomplish this?

    • Hi Maria. Your prefix should be “1.” (code block with speech marks). Precision 3 (code block). starting number 0.101 (code block). That should work. Let me know if you still have problems.

Leave a Reply