/// <summary>
        /// Flips the direction of FromRoom/ToRoom for this door or window.
        /// </summary>
        /// <param name="familyInstance"></param>
        /// <returns></returns>
        public static Revit.Elements.FamilyInstance FlipFromToRoom(Revit.Elements.FamilyInstance familyInstance)
        {
            Autodesk.Revit.DB.FamilyInstance uwFi = familyInstance.InternalElement as Autodesk.Revit.DB.FamilyInstance;

            TransactionManager.Instance.EnsureInTransaction(DocumentManager.Instance.CurrentDBDocument);

            uwFi.FlipFromToRoom();

            TransactionManager.Instance.TransactionTaskDone();
            //DocumentManager.Instance.CurrentDBDocument.Regenerate();

            return(familyInstance);
        }