Most of the time it is easy to read a value from the properties of an element in Dynamo. This is not true of the ToRoom and FromRoom properties of a door. They are not exposed directly from the element. We already showed how one may calculate the rooms by extracting the door calculation points and then checking in which rooms they are.
Revit schedules allow this to be done quite easily but reading the information from the schedule is not that easy. I found a script that exposes the values in a schedule. This can also be very useful for automating writing schedules directly to excel or some other platform. The alternative would be to manually write the schedules to excel, or to extract the properties from elements and then write them out.
Note that the schedule is a view and can be selected as such for input.
This script was shared by Thomas Mahon from Bimorph Consultancy Ltd.
It retrieves the headers and data from the required schedule view. Transposing the list makes it clear what is being read.
Now it is also easy to extract the required column from the list by the index.
Lastly, to get to the raw data, one drops the headers.
I will be using this method in the future when I want to read the room data of elements from schedules. It is an easy way to get access to non-element properties that have been already calculated by Revit.
If you need help adopting Revit, BIM, and Dynamo in your practice, contact micrographics so we may be of assistance.