Revit has many fantastic automation features. For example, it can number elements sequentially, such as grids, rooms and doors, as they are placed in the model. However, since the 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.
Naming convention
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 to the ‘from’ room. Confusing!
Room calculation point
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. However, assuming the family has been built correctly, how can we automate the naming convention?
Using BIMlink
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.
Dynamo automation
To do this, you can use the ‘Door.RenumberByRoom’ node found in the Parametric Monkey Dynamo package. Users have the option to enter 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. (See this tutorial to renumber rooms). 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.

If you require more flexibility in the naming convention, use the ‘Door.RenumberProperties‘ custom node. This node will allow you to concatenate the parameter as desired.

69 Comments
Evan Danchenka
Great script. Is it possible to complete without a prefix?
paulwintour
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.
Brendan
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.
paulwintour
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.
Brendan
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
http://snag.gy/9TqyF.jpg
Brendan
Found the problem its Revit 2016 mid service update Dynamo doesn’t like it, The scripted worked fine in Revit 2015
paulwintour
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.
Kimberly
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.
paulwintour
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.
paulwintour
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
Sydney
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.
paulwintour
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
Shady Hakim
I have the same problem with Revit 2015 and Dynamo 1.0.
paulwintour
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.
yann
hmm still not working here..
Revit 2106 and Dynamo 0.9.2.4472
any help?
paulwintour
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.
Yann
working perfectly!
best,
Yann
Brad
Is it possible to modify this to access rooms in files that are linked in?
paulwintour
Hi Brad. Do you mean that you have rooms in one file and doors in another?
Brad
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.
paulwintour
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.
Brad
Thanks Paul.
Will
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!
paulwintour
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.
Will
Thanks for the help. I’ll try it again and post further details if still issues.
Thank you again.
Will
Muses
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.
https://snag.gy/FfhHy4.jpg
Note: All lacings are Longest.
paulwintour
Nice work. Glad it was useful.
Muses
Then List.AlphabeticalSequence come from Clockwork Package
SCOTT WALSH
Hi Muses and Paul,
We also do alphabetical sequencing, but when I am trying to copy the image above I am not able to replicate it as the List.Map does not exist in the version I am using. I am using the package from 1.3.2 from the 8th of May.
Can someone please send an updated screenshot that I can replicate?
Thankyou!
paulwintour
Hi Scott. What version of Dynamo are you using? The node has only been tested on Dynamo 1.3.3. If you are using Dynamo 2 then things are fundamentally different and possibly breaks the node.
Chas
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?
paulwintour
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.
Chas
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.
paulwintour
No problem. Glad you sorted it out.
Van
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.
paulwintour
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?
Scott
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!
Przemek
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.
paulwintour
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.
paulwintour
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.
John Anesbury
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?
paulwintour
Hi John. They prefix already is a letter, ‘D’. Do you mean the suffix? If so, the node can be modified as follows:
https://www.dropbox.com/s/j70atwyht4s33cw/Dynamo_RenumberDoors_Letters.png?dl=0
John Anesbury
Hi Paul,
Yes sorry, I meant suffix. I modified the node and it works a treat.
Thanks for that.
Fernando Pagaza
Hi Paul,
Could you please show the whole script?
Where can I find your original script?
Thanks in advance.
Fernando Pagaza
paulwintour
Fernando you can find the whole script by editing the custom node.
paulwintour
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!
Meghna
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!
paulwintour
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.
Meghna
Hi Paul,
Yes, there are rooms in the model but I don’t know what the issue is. I have attached an image for your reference –
https://app.box.com/s/yoviicqb1jwg4po95tdwcjkotb8c3fxp
Thanks!
paulwintour
Hi Meghna. Can you try with v1.4.4 and see if that works. If not, upload you model somewhere, send me the link and I’ll take a look.
Meghna
Hi Paul. I tried that and it didn’t work. Could you please contact me on: meghna.majethiya@gmail.com so that I can share the file with you? (Since the file is from work, I wouldn’t want to upload it on a public website).
Thank you so much! I really appreciate it!
Ramyo Dey
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
paulwintour
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.
Ramyo Dey
Hi Paul,
Got it working, issue was the older version.
Thanks a lot.
Ramyo
John
I cannot download the package without having to uninstall packages that all of my scripts are based off of.
I get an error that says: “BVN 1.5.5 has dependencies. To install BVN 1.5.5, dynamo need to first uninstall the following dependent packages: LunchBox for Dynamo, Clockwork for Dynamo 1.x, archi-lab.net. Restart Dynamo to complete the uninstall, the try and download BVN 1.5.5 again.”
I want to be able to use your node package, but if it is at the cost of losing 3 the most frequently used packages…unfortunately BVN is not usable for me.
paulwintour
Hi. Yes this is a problem with how the Package Manager works. What you need to do if installing via the package manager is to search for BVN and install. It will say that some packages need to be uninstalled first. They will be marked for removal. You need to close Dynamo and Revit to fully uninstall them. Then you must reopen Revit and Dynamo and try to install BVN again. This will automatically install the dependency packages including Archi-lab, Lunchbox and Clockwork. Thats what dependancies means. You won’t lose 3 of the most frequently used packages…
Artyom Savin
Hi Paul,
The naming convention in our office is a bit different from what you’ve created. I’ve modified it to have an alphabetical suffix based on your previous comment, but in addition to that rooms that only have one door should have no suffix. For example a 3 door room should still be 103A, 103B, 103C, but a single door room should simply be 104, not 104A. I’m new to Dynamo and I’ve tried to filter out all the rooms with only one door but it doesn’t seem to be working successfully. I’ve attached a screenshot of what I’ve tried so far: https://snag.gy/6tDg84.jpg
Could you suggest a solution?
Thanks a lot.
Artyom
Artyom Savin
Hi Paul,
I’ve been trying to modify this script to fit the naming convention at our office. I’ve already changed the suffix to be alphabetical based on your previous comment. The next issue is that for rooms with only one door we want no suffix. For example a room with three doors would still be 103A, 103B, 103C but a room with one door would be just 104. I’ve attached what I’ve tried so far: https://snag.gy/6tDg84.jpg however, it hasn’t been successful.
I’m new to Dynamo and any suggestions would be greatly appreciated.
-Artyom
paulwintour
Hi Artyom
I would try something like this by inserting an empty value into the start of the list. Let me know if that helps.
https://www.dropbox.com/s/x15wx6zayukwyuo/Door%20renumber.JPG?dl=0
Artyom Savin
Hi Paul,
I wasn’t able to figure out how to connect the example you provided above to the rest of the script in a way that gave the desired outcome. In the meanwhile I’ve modified your custom node to not place a suffix for multiple doors in one room. The majority of our rooms have one door so the manual entry of a letter suffix in those cases is minor. Though I would like to figure this out properly! Thanks,
Faisal
Hi Paul,
I’m trying to modify the script so it numbers the doors A,B,C instead of the 1,2,3 but it’s not working. I’m new to dynamo and we have about a 500+ doors to rename by room number and tag ” 1001-A” etc.
Here’s the link to my version of the script:
https://www.dropbox.com/s/ptj87mub64yzk1l/Door%20Renumber%20-%20Alphabet%20Suffix.JPG?dl=0
This is what it shows up as:
https://www.dropbox.com/s/6232pqexj7aiuv8/Door%20Renumber%20-%20Result.JPG?dl=0
Also the suffix “.” is not changing to a “-” that we need to match the door naming convention in my office. Please help to solve this. Thank you.
paulwintour
Hi Faisal. Can you send me your file please so that I can take a look.
Ag
Hi there, great skript my only problem is that it does not return the room numbers?
I reopened the script and looked into the node. seems it is having some issues with this block? but I am not enough into it to understand how to change it?
Would really appreciate some help!
Paul Wintour
Hi Ag
The ‘Door.RenumberProperties‘ node returns the room number. But keep in mind, this package was developed for Dynamo 1.3 and is no longer being maintained. If you are after updated versions for Dynamo 2.X, check out our Dynamo Package development service: https://parametricmonkey.com/dynamo-package-development/
Dmitri
Dear Paul,
Wonderful script, although, I have faced with one minor issue that I cannot fix by myself. I wonder if it is possible to separate doors by function, meaning get values by exterior and interior and then define them with different naming.
I have been struggling to find the solution for quite a while.
I can also share the flow I was working on.
I look forward to hearing from you soon.
Yours sincerely,
Dmitri
Paul Wintour
Hi Dmitri. This should be possible. Can you upload a screenshot of where you got to. (Note, you can’t upload files directly. You’ll need to publish to say Dropbox and then share the link).
Dmitri
Dear Paul,
Sending you a screenshot of the flow as well as the model.
I have managed to divide doors by function and get count of how many doors should be exterior and interior.
Dynamo Core 2.12.0.5650
Dynamo Revit 2.12.0.5740
I look forward to hearing from you soon.
Yours sincerely,
Dmitri
Dmitri
Dear Paul,
The link unfortunately has not been uploaded. Thus, sending it once again.
https://novarcgroup-my.sharepoint.com/:f:/g/personal/dmitri_novarc_ee/EtwG35US0t5Mqi7XLiqt06oB0lQzG_2XF63criXEhjUCuA?e=7X8dwk
Yours sincerely,
Dmitri
Paul Wintour
Hi Dmitri. Just a few things.
– The free version of the script was developed with Dynamo 1.3. There are likely many things that need updating for 2.X, particularly 2.12. If you need help with this, we offer a paid service. Just email me to find out more.
– The Door.RenumberProperties has some inbuilt collection filters. For example, it filters by phase. So trying to get it in sync with ‘All Elements of Category’ is not reliable.
– Your script is failing, as the list lengths (elements and values) probably don’t match.
– The filtering by interior/function should be applied within Door.RenumberProperties. This is to keep the data in sync and also so that the numbering is consecutive. OR, as a hack, use the elements output from Door.RenumberProperties as your starting point, and get its function from there.
I hope that helps.