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

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

  6. Hi Paul,

    I’m trying this out and I’m getting an error as per the attached. It’s like the input string is incorrect but I’ve exactly matched what you’ve posted above as an example. I’m on Revit 17 with Dynamo 1.3.2.2480.

    https://imgur.com/a/Ou7LF

    • Ah looks like I got it working by changing the code block of “2” to an Integer slider.
      Now the code runs fine, but it isn’t actually renaming my rooms. The output of elements is correct however. Hmmm

        • Thank you for your help Paul, and for sharing your work for us all to use.
          Here is an image of my Dynamo with the spline selected.

          https://imgur.com/a/jO1jp

          You can see that it grabs the rooms well enough, and appears to exclude the corridor, but the actual ‘renaming’ doesn’t occur. The Spline was drawn from the centre, outward to test.

          Ta again.

          • Hi Thiefsie. Are you talking about renaming or renumbering? Your room tag looks like it is only showing the room name. This node is designed to renumbering the room number parameter. If you add in a prefix ‘APT-1’ that is a string (text) value. Room number needs to be a number so it won’t work. Also the starting number should be 0.01.

            • Oh wow. That’s really dumb of me!

              Thank you again for taking the time to help out a clutz like me!

              Big fan of BVN here being a Melbourne Architect. Cheers

  7. Working through this by reviewing some of the errors people have had in previous comments. I think I have everything setup correctly but it looks like the watch node attached to elements only says null and will not show rooms.

    • Chad you are going to have to give me more information. Which Revit/Dynamo version are you using? Which version of Parametric Monkey? Can you post a screenshot pls.

  8. Hi,
    I am also having trouble getting this to work. I have set the Geometry Working Range to large, I am using Revit 2018, and Dynamo 1.3. Can I email you the file and script?

    • Hi Julia. What package and version are you using? Can you upload a link to a screenshot please.

    • Hi Julia. Which package and version are you using? Can you upload a link to a screenshot pls.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.