Challenges with mirroring the Revit model and Doors or Windows

We have encountered challenges with mirroring the Revit model, especially when it comes to windows with slanted or divided designs. This causes errors in the window schedules, as Revit mirrors all elements. However, when the same object is used in a legend, it appears as it originally was, before the mirroring. For example, if you have a window with a sash on the right side and mirror it, the legend will still show the sash on the right side, while the facade shows it on the left side.

I want to develop a Revit add-in that automatically mirrors the window back to the correct orientation and then replaces it with a correct window loaded from ACC. Is this possible with pyRevit?

Yes, you’ll need to look at few properties: HandFlipped, FacingFlipped, and Mirrored.
CanFlipFacing, CanFlpHand and CanFlipWorkPlane all report what controls have been set in the family. CanFlipWorkPlane is False for windows. But the other two will tell you what has been designed into the window family.
A window that is mirrored and flipped will look the same as a non-flipped and mirrored windows. But is technically different.
Doors exhibit the same issues.

1 Like

@mangrove-art that one is a fav’ topic of your

and @ErikFrits as well!

Thanks for the reply! Once I’ve identified the windows and doors that need to be replaced, I’m wondering what the best approach is for swapping out the window family with one that has the correct orientation. Do you have any tips on how I should proceed?

@alexgilje as @aaronrumple allready said you have to consider a few properties to solve this. For doors my approach is contained in todays pull request Door flip state by mangrove-art · Pull Request #2663 · pyrevitlabs/pyRevit · GitHub. The approach is purely logical. A door (and by extention a window) has two states: unmirrored or mirrored. From this point you may go further on. Hope this helps.

1 Like

That is correct only if all doors have been built consistently. Some will put the hinge on the right, some will put the hinge on the left. Some will mix up interior and exterior. It is difficult to predict what the end user will mess up.

@aaronrumple : Yes, inconsistent modelling in families is certainly tricky. I have tried to solve the problem by creating two parameters in the family to vary the return value for both states (mirrored/unmirrored), you may have a look to my comment here: Door flip state by mangrove-art · Pull Request #2663 · pyrevitlabs/pyRevit · GitHub . It would be interessting to have your point of view on that point. @Jean-Marc objected that creating parameter would maybe dissuade users from using the tool.

1 Like