Most of the offices I’ve worked in had a standard practice for numbering doors. Usually the door number matched its room number, with a letter sequence designating each door in the room. So the first door in room 101 is numbered 101A, the second 101B, and so on.
Revit makes dealing with rooms and doors much easier but unfortunately, it doesn’t provide an easy way to link the door number to the room number. Doors know what room their in, courtesy of the “To Room” and “From Room” parameters, but there’s no direct way to use that information to populate the door number. That is, without resorting to some code.
This Revit macro automates the process of numbering doors based on their room number. It reads the “To Room” parameter and combines it with a letter sequence to generate the new door number. Here’s a before and after example of the macro in action:
Here are a couple more things to know about the macro:
- The letter sequence of doors within a room is determined by the order in which the doors were created. If a closet door was created before the main entry door, it will be the “A” door. Unfortunately there isn’t an easy way for the macro to determine which door is more important.
- Also, the macro doesn’t create a link between the door number and the room number. If your room numbers change, you’ll need to re-run the macro to update the door numbers.
Download the Free Macro
You can download the macro from the free ArchSmarter Toolbox. Don’t have access? Sign up for ArchSmarter updates in the form below and get immediate access to this and other time-saving Revit macros!
Hi Michael,
I have downloaded the marco for door numbering and played with it a bit in the test model provided, where it works beautifully. However when I try to implement this into a model I have made it wants to number all the doors as “EXT” even though they have a both a “to” and “from” room. I have checked the constraints for the rooms and the doors in the model and everything is correct, the doors are captured in the room boundary but no luck.
Have you seen this happen before and is there a simple fix you know of?
Thanks,
Adam
Michael,
This is a great macro, is there any way to alter/modify it to renumber doors by area number instead of room number?
Thanks,
Jacob
Thanks Jacob. Unfortunately I don’t thinks it’s possible. The macro uses the “ToRoom” property of the Family Instance object. Essentially, every family instance “knows” what room it belongs to. Looking at the Revit API, I don’t see a way to get the area number in a similar fashion. There’s isn’t a “ToArea” property. Also, it also doesn’t look like there’s an easy way to link an area to a room. That said, I’ll do some more exploring to see if I can come up with something.
First off, I recently discovered this site and it is awesome. I’m having some difficulty running this macro, hoping you can help me isolate and destroy the problem.
Run Unsuccessful – Using Revit 2018.3.
Error Details:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter Name: index.
at MacroModule.executeMacro_(MacroModule* , Astring* macroName)
at MacroModule.executeMacro(MacroModule* , AString*)
at ULMacroGeneralManager.runMacro(UIMacroGeneralManager* , MacroModule* pModule, Astring* macroName)
Same issue in Revit 2017.0.5
Macro works as expected in a smaller test model, but not in the larger project I need it for.
I like the this macro a lot, except when I try and copy it into my project I get an error saying: “Type ‘frmRenumber’ is not defined. (BC30002)”. Can anyone help me with this?