Renumber doors by rooms

Revit has many fantastic automation features. For example, it is able to sequentially number elements, such as grids, rooms and doors, as they are placed in the model. However, since architectural design is not a linear process, this sequence can quickly become out of date. Unfortunately, Revit doesn’t have an automatic renumber command to correct the problem. In the past, Architects have either had to do this manually or rely on 3rd party apps, such as Imaginit. These methods proved to be either time consuming and/or expensive.

One particular task which consumes much more time than it should, is the renumbering of doors based on the room in which it is located. Depending on your office’s naming conventions, a door generally is named something along the lines of, Element prefix – Room # – Sequence #, for example, D-101-01. Added complexity also comes into play when trying to define which room the door is located. Generally, a door will be numbered based on the ‘to’ room, unless that room is a corridor or an external area, in which case it reverts back to the ‘from’ room. Confusing!

Revit_RenumberDoors

Since Revit 2014 when Autodesk introduced the room calculation point, it has been possible to schedule the ‘to’ and ‘from’ parameters in door families. This feature has its limitations and quirks as documented here. However, assuming the family has been built correctly, how can we automate the naming convention?

One possible answer is to use BIMlink to export the schedule into Excel. Using a series of conditional statements we could semi-automate the process. But for this to work you need to be a bit of an Excel wizard and it’s not that user friendly. Conversely, we can create a simple Dynamo script which fully automates the process, is easy to use, and eliminates the need for either Excel or BIMlink.

To do this you can use the ‘Door.RenumberByRoom‘ node found is the BVN package. Users have the option to enter in a prefix, such as ‘D’, and a separator, such as ‘-‘. Depending on your offices’ naming conventions, the custom node can be edited and re-ordered as required. The script reads all doors in the project and returns the ‘to/from’ room number per door. By default, doors are renumbered based on the ‘to’ room. If however there is no ‘to’ room, such as an external door, it will revert to the ‘from’ room. If there is neither a ‘to’ or ‘from’ room, that is, there is a missing room, the doors will be excluded from the renumbering process. Once this is known, all doors within the same room are sequentially numbered in an anti-clockwise direction. Boom! Hundreds or thousands of doors renumbered instantaneously. In the future I plan to add some additional functionality like the ability to filter out certain rooms regardless of the to/from room, e.g. corridor.

The custom node is part of our BVN package (v1.2.5) available via the Dynamo Package Manager. Check it out and you might save yourself hours of time.

50 Comments on “Renumber doors by rooms

  1. Great script. Is it possible to complete without a prefix?

    Like

    • Hi Evan. In the previous version this wasn’t possible without going into the node and modifying it. However I have just uploaded v0.2.5 to fix this issue. If you don’t want the prefix, simply connect up a blank string node and it should work as expected.

      Like

  2. I don’t know what I am doing wrong i have loaded all the packages that i need, Created the above code, Run the script and i keep getting Null as a return value under watch. I have no doubt this is 100% my fault some how just cant figure it out but congratulations on the script this is a great time saver.

    Like

    • Hi Brendan

      If you install the BVN Dynamo package it will also install all the dependent packages so that shouldn’t be the problem. Without seeing a screenshot, here are the only things I can think of:
      – Ensure all the geometry is created in Revit, save the file, THEN open up Dynamo;
      – Ensure you are using a string node and not a code block (or if so use “quotation” marks);
      – Ensure you have run the script (or it is set to automatic).

      it is working for me so let me know how you get on.

      Like

      • Thanks Paul,
        I have reinstalled the packages through Dynamo this time, I got our IT department to disable our sever proxy to do this. Before i downloaded the packages and installed them on my local drive manually Dynamo didn’t seem to like that.

        I all so followed you above instructions, however it still doesn’t seem to work i’m thinking it might be an IT issue on our end I will give it a go at home

        I have also posted a screen grab below of the code

        Like

  3. Found the problem its Revit 2016 mid service update Dynamo doesn’t like it, The scripted worked fine in Revit 2015

    Like

    • Hi Brendon. Sorry for the late reply. I’m just switching over to Revit 2016 now. Let me test it and I’ll get back to you. There shouldn’t be any reason why it isn’t working.

      Like

  4. Hi, thanks for this script; just what we were looking for. I’ve made one adjustment to the custom node though: we use the marks from the From Room, so I’ve switched the connections in the custom node.
    Everyhing works fine, I did notice however that when I change a room number, the doornumber doesn’t update after I hit Run. When I close and re-open Dynamo en re-run the script it does work.
    Something we’re going to have to keep an eye on.

    Like

    • Hi Kimberly. I’m glad you found the node useful. Yes I am aware of that problem but I believe it is a limitation of Dynamo. But just to be sure, I’ve asked the Dynamo community. You can follow it here. I’ll let you know what I discover.

      Like

    • Hi Kimberly. I’ve updated a new vesion of the package. I’ve added a toggle to the node. It still won’t update automatically if you change the room number, but if you change the toggle (from true to false or vice versa) it will recompute and update. It just saves you closing and reopening the file. Not ideal but it is a limitation of Dynamo and how it executes Python nodes. Its a known issue: https://github.com/DynamoDS/Dynamo/issues/4603

      Like

  5. Hi Paul,

    I am having similar issues to Brendan, where the result is Null when I run the script. I am also using Revit 2016 and was just wondering if this is an issue or something else. I have tested the older version when this script was first created (v0.1.8) – this worked fine the first time and then Null after that. Not sure what would be the issue here.

    Like

  6. Hi. What version of Dynamo are you using? I think they might have changed the syntax for the input to clusters in version 0.9.2. Let me find out more and I’ll get back to you

    Like

  7. I have the same problem with Revit 2015 and Dynamo 1.0.

    Like

  8. Shady Dynamo 1.0 isn’t yet supported. There have been some major changes to how Dynamo works so it will take some time to update the package. All of the packages are having similar issues. I plan to release something in the next couple of weeks and will kepp you posted.

    Like

  9. hmm still not working here..
    Revit 2106 and Dynamo 0.9.2.4472

    any help?

    Like

  10. This node has now been updated (v0.4.7) and has been tested on Revit 2016 R2 with Dynamo 1.0.1.1576. The problem was with the input/output syntax which changed. There was also a node from the Clockwork package which changed name. It should now work as expected. Please let me know if you experience any more issues.

    Like

  11. Is it possible to modify this to access rooms in files that are linked in?

    Like

      • yeah, the doors and walls are in the main file with rooms and other walls in another file that is linked in, can’t seem to get it to work without binding the link in.

        Like

  12. Hi Brad. Yes in theory it should be possible. However, I’m using lunchbox to collect all the rooms which only returns rooms in the current file. The node would need to be modified by replacing the Lunchbox component with either the Spring Nodes or Steam Nodes component to get the rooms in the linked file. But I’m having issues with these: https://forum.dynamobim.com/t/get-rooms-in-linked-file/4939. I’ll let you know what I find out.

    Like

  13. Hi
    I am a complete beginner to Dynamo. I am having trouble getting this tool to work on Revit 2016. I did have it working in 2015.
    I have downloaded the packages but still no luck.
    I note that a ‘toggle’ command has been added to the Door Renumber node. How does this work?
    Many thanks for your help and for the great tool!

    Like

    • Hi Will. What version of the BVN package are you using? Is it the latest? It is a bit hard to troubleshoot without any images or files. Can you submit a post on the dynamobim forum and post the link here. That wway I’ll be able to take a closer look.

      The node use some python scripts inside it, namely Lunchbox room collector. If you make any modifications in Revit and re-run the Dynamo script, these Python nodes won’t re-run as it thinks nothing has changed. The boolean toggle is a work around to trick it to re-execuating so that you get the desired results. This is a known limitation of Dynamo and you’ll see this workaround in lots of other packages. If you set your script to automatic, just use the toggle and it should work.

      Like

      • Thanks for the help. I’ll try it again and post further details if still issues.

        Thank you again.
        Will

        Like

  14. hi, Paul,
    Thanks your great works. Here is my script that modified from your great work. It is because we use alphabet sequence instead of number sequence.

    Note: All lacings are Longest.

    Liked by 1 person

  15. This node works great but when there are curtain wall doors in the model the result goes back to null and does not work. I’m pretty new to Dynamo, would I have to edit the node to filter out curtain panel doors? What would be the easiest way to do this?

    Like

    • Hi Chas. Sorry for the late reply. Curtain wall doors should work. They are working for me. Can you provide more info so that I can help.

      Like

      • Hi Paul. Sorry my bad. The reason it didn’t work was because there was no room created yet where the curtain door was. That’s why I had the null results.

        Like

  16. Is this node ok with revit 2017.2 on dynamo 1.2? i just seem to get null values back with it doing nothing to door numbers in revit. Be really cool to see this work.

    Like

    • Hi Van. I have only tested it with Revit 2017.1 and Dynamo 1.2 but I see no reason why it shouldn’t work on 2017.2. Can you tell me more about the problems – do you have standard doors with rooms in the model?

      Like

  17. I’m having the same issues as Van. Returns null values. Also running revit 2017.2 on dynamo 1.2.
    Worked fine in Revit 2016 on dynamo 1.2.
    Thanks for the help! Huge time saver on large projects!

    Liked by 1 person

  18. Hi Paul,
    I have tried to use your node, but all I get is “function” appearing in the watch node.
    I can’t work out what is wrong with it. Also, what do I do with toggle? Do I leave it blank? maybe good to say I am freshly new to Dynamo.
    I’m using revit 2017.2 on dynamo 1.2.

    Like

    • Hi. There is an issue with Revit 2017.2 apparently. I’m in the process of fixing/updating it. I’ll upload the latest version next week. Sorry for the delay.

      Like

  19. Hi everyone. This node has now been updated (v1.2.5). I have tested it with Revit 2018 and Dynamo 1.3. The node now no longer requires a prefix input. You can simply leave it empty if required. (Previously it required an empty string). Also the reason people were getting ‘function’ is that you had rooms missing and therefore it couldn’t find either the ‘to’ or ‘from’ room for the door. To fix this, the doors are now being excluded form the renumbering process if no room can be found. If you want to renumber the excluded doors simply click on the element in the watch node to find out where it exists, add in the room as appropriate and re-run.

    Like

  20. Hi Paul,
    This is a huge time saver. The only thing is we prefix our doors by letter instead of number, i.e: D.G01.A is it possible to change the prefix option?

    Like

    • Hi John. They prefix already is a letter, ‘D’. Do you mean the suffix? If so, the node can be modified as follows:

      Like

      • Hi Paul,
        Yes sorry, I meant suffix. I modified the node and it works a treat.
        Thanks for that.

        Like

  21. Hi Everyone. Please note I have updated this node in the latest version of the BVN package (v1.4.4). Its been tested on Revit 2018 and Dynamo 1.3.1. This updates fixes some bugs and includes some improvements. It will now work with curtain wall doors and rooms with multiple perimeters (such as an internal column which is room bounding). It will also renumber doors in design options. Again if you come across any issues, please post here and I’ll try to fix asap. Happy renumbering!

    Like

  22. Hi Paul,
    I have just started using Dynamo.This seems great and it’d be really useful, but i’m facing an issue. Hope you can help me with this –
    The “Watch” from renumberedElements shows null but the “Watch” from the excludedElements has about 160 doors. Could you tell me what has gone wrong? I think if it swaps, it should work in my case. But I don’t know what needs to be changed!
    ( I’m using Revit2017, Dynamo 1.3.1 and BVN 1.4.2)

    Thanks in advance!

    Like

    • Hi Meghna. The node will exclude doors if there is neither a ‘to’ or ‘from’ room, that is, if there is no room. Do you definitely have rooms in the model? It won’t work if the rooms are in a linked model for example.

      Like

  23. Hi Paul,

    I am also facing a similar issue as above as all doors are coming as excluded.

    It was working fine before, I only changed it to have the alphabet sequence and all doors were inside the excluded category.

    Any advice would be very helpful.

    Thanks,

    Ramyo

    Like

    • Hi Ramyo. What version of Revit, Dynamo and BVN package are you using? Please use latest version of the BVN package or at least v1.4.4 as there were some bug fixes. Also, please check that the door families have the room calculation point enabled. Rooms will be excluded if there is neither a ‘to’ or ‘from’ room. Let me know if this solves your problem.

      Like

      • Hi Paul,

        Got it working, issue was the older version.

        Thanks a lot.

        Ramyo

        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: