Parameter to tell if door has been flipped

I’m writing a Python script to change the mark of doors to match the number of the room each door swings into. “ToRoom” and “FromRoom” depend on how the door was originally placed, so I need to also determine if the user has flipped the door’s direction since it was created.

I thought the “FacingFlipped” parameter would help me, but according to this it seems that that parameter depends on how the host wall was drawn, not on what the user has done to the door. Is there another parameter that I can use to find out whether the swing direction has been toggled?

Issue here is if you’re trying to track historical data on whether a door has flipped, you’d need to compare the current state of the model to a historical snapshot when the door was first placed. Seems like a lot of work and extra files. Maybe there’s an API-fu way to do it.

However, if you only need to track which room the door swings INTO, have you tried:

  1. Drawing a bounding box around the door. Since the door swing will protrude into the room, you just need to get the centerpoint of the bounding box and calculate the room it falls in.
  2. Tracking the “Room Calculation Point” of the doors. This will require you to locate a room calculation point for each door family, but it will be useful for door families that don’t have a swing (e.g. sliding doors) and would have their bounding boxes centered on a wall. I think there are custom packages that track the rooms an element is associated with. Element.Room from Rhythm comes to mind.

Thanks for your reply Jerry. You’re right that this might be possible with some geometric steps, but I’m trying to avoid that because my project is pushing 10,000 doors and every step I add significantly increases the weight of the script.

The nodes you mention are accessing the “ToRoom” and “FromRoom” parameters, which I also want to use. That’s all working fine, the issue is that for each door I have to choose which of those two rooms is the one the door is actually swinging into. I was hoping that the flip-arrow you click to flip a door would have a boolean associated with it somewhere that I can access.

from the orchid nodes