In this series of blogs, I am looking into the automation of a script that would infer the Door orientations in a project automatically. Left opening, right opening, left reverse opening, right reverse-opening. There is already a script in existence in the Archilab package that tries to manage this, but due to the behaviour of doors, it does not work very well when the orientation of doors are toggled all the time.
I decided to use a script that I got in Berlin at an Autodesk conference in 2016. If you would like to understand how it works, please consult the following blogs.
This script reliably gives the left/right orientation without fail.
Two more aspects of the orientation are of interest to us. From which room to which room does the door lead, and is the door reversed?
The reversal of the door can only be understood in terms of the ToRoom and FromRoom properties of the door. As background, consider that the door has two room calculation points. These are inferred on door placement and toggled when the door is toggled. The converse is also true. If one of the rooms are changed, the door is flipped. Hence, we are unable to infer if the door is reversed. This is therefore a property that one must input manually.
Here are some points to take into consideration:
- If rooms already exist on either side of a wall when a door is inserted, the room on the swing-side of the door will be set as the To Room
- If the door is then flipped, the To/From Room parameters do not update. The user has to make manual adjustments if desired.
- If no rooms existed when a door was inserted, the first room added to either side of the door will be set as the To Room;
- Both doors and rooms must be in the same model for these parameters to report. The schedule can reside elsewhere, however manual changes between the two reported rooms must be made in the host model.
The blogs following, we will examine some more of the script that help us define the orientation of the doors.
If you need help adopting Revit, Dynamo and BIM, please contact Micrographics so we may be of assistance.