From Room To Room - Door Schedule

Hello everyone,

I am trying to add the From Room to the door schedule and when the door swings out, I was hoping to get the To Room since the value would be “null”.

I’ve tried to filter the rooms in many different ways but nothing seems to work, as I am still getting empty cells in the door schedule.

Please let me know if you guys have any ideas on how to fix this.



Hello…could you zoom your image, we cant see whats goin on…

Sorry about that.

1 Like

no worries :wink:

Maybe an extra if statement would do the trick, or a python script…

Hello @khronart

Hope this will solve your problem and you can modify this as per your requirement.
I have used Revit 2019 and Dynamo 2.0.3

Door.FromToRoom.dyn (20.9 KB)

Thank you! would there be a way to get the same amount of From Rooms as To Rooms so I can map them back to the doors? Right now I have 97 doors, 97 From Rooms with null values and only 90 To Rooms.

Hello @khronart,

Those Null or Empty cell you are getting in the doors because there is no room tag assigned on one side or both side of the door. for example main Door / front door of the building.

can you please cross check on the doors with null value, whether room tags are assigned on either side of the door or not?

This is the method I use using my package (Crumple). This will first check if the door has a toroom, and if not it will source its from room instead. Then if it doesn’t have a from room I replace it’s number with an empty field. Function.Apply is able to be used to suppress any errors.

door tofrom.dyn (16.1 KB)


Hi Gavin …does this node work at linked doors as well ?

I may be mistaken, but I believe the to/from room fields are not available when in a linked state. I think the node would technically accept linked doors as elements and a linked phase from the same model (it doesn’t depend on the current document in the python code), but I expect it would return empty values (just like Revit does for to/from linked values).

For reference this is the Python code:

# Made by Gavin Crump
# Free for use
# BIM Guru,

# Boilerplate text
import clr

import Autodesk 
from Autodesk.Revit.DB import *

# Define list/unwrap list functions
def uwlist(input):
    result = input if isinstance(input, list) else [input]
    return UnwrapElement(result)

# Preparing input from dynamo to revit
doors = uwlist(IN[0])
phase = UnwrapElement(IN[1])

hasto, hasfrom, counter, torm, fromrm = [],[],[],[],[]

# Do some action in a Transaction
for d in doors:
	if hasattr(d, "FromRoom") and str(phase.GetType()) == "Autodesk.Revit.DB.Phase":

for t,f in zip(torm, fromrm):
	c = 0
	if t == None:
	if f == None:

# Preparing output to Dynamo
OUT = [torm, fromrm, hasto, hasfrom, counter]
1 Like

This is brilliant, thank you all!

1 Like