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

My next issue is with fascias. They also end up incorrect after mirroring. I’m guessing I’ll have to delete the existing ones and reapply them — or is there another way? How should I handle this? I’ve tried a few different methods already.

fascias, line based components, structural framing (with some rules not), … etc?, don’t like to be mirrored.

Revit can’t handle mirror that well. Horrible coding on their part if you ask me but it is what it is.

In the Netherlands there are quite a few firms that don’t allow mirroring at all. They have plenty of budget I guess. But we do and have some scripts to cope with that and allow sharing correct info.

1 Like

You’re definitely not alone — mirroring windows (especially asymmetrical ones) in Revit can be really tricky, and the legend behavior makes it even more confusing.

In Revit, when you mirror a family like a window, Revit just flips the instance — it doesn’t swap it for a different type. So in your schedules or legends, it still shows the original orientation because the family definition hasn’t actually changed, just the placement.

About your idea for a custom add-in:
:white_check_mark: Yes, this is possible — but it will take a bit of careful scripting.
Using pyRevit (or the Revit API with Python), you can:

  1. Detect mirrored windows — check the HandFlipped and FacingFlipped parameters.
  2. Automatically replace them with the correctly oriented type from your ACC library.
  3. Reload or swap families as needed so the schedule and legend match the facade.

Keep in mind that pyRevit is great for quick tools and Python scripting inside Revit, but some advanced family replacement logic may be easier with a compiled Revit API add-in (C#) if it gets complex.

If you’re comfortable with Python and the Revit API, you can absolutely prototype this in pyRevit first. I’d suggest starting by writing a simple script that:

  • Loops through all window instances.
  • Checks which ones are flipped.
  • Replaces them with a matching family type from your library.

Tip: Be careful with parameter matching so you don’t lose host info or parameters when swapping families.

If you’d like, I can share some example Python snippets to get you started!

1 Like

Now I have figured out how to change to the correct windows with pyrevit. I am trying to get any windows from ACC. But I am struggling to find a way to filter out windows based on HandFlip or FacingFlip.
It seems a bit random what the value is. Can someone explain to me what is behind HandFlip and FacingFlip?

Haven’t found a way for Facias and Gutters yet.