Is element flipped on Workplane

Hi Everyone.

I have had an extensive look and cant seem to find any nodes that return whether an element has been flipped on its Workplane or not.
I have an issue in one of my models where some light fittings have been flipped (eg. are upside down) and i need to rectify them. I am wanting to save time by reporting the flipped status and then pushing the change so it fixes the issue.
I find plenty of scripts that can flip an element on its plane but nothing that returns its status.
The nodes I have tried do not report what i am after. (see below)


I apologise in advance if it has been discussed in here and I have missed it.

Thanks in advance


Did you have a look here?

1 Like

Hi There,
Yes i did look at this page unfortunately im not up to speed yet with Python and using the Revit API.
I was hoping there was a node out there that was able to “Is Element flipped on workplane”.

Meanwhile I am trying my best to get my head around python.

I am pretty much after a bool that will process the following API.

@bwilkeA77N6 try this one, it is an amendment of the script found in the page provided by @bvs1982
FlipComponent.dyn (7.7 KB), it will report which family can be flipped, which family is flipped, and which family is not flipped while you have the Bool set to False, once you check the families and would like to proceed, set the Bool to True and Run again, all flipped families will be restored, hope it helps:

import clr
import math
from Autodesk.DesignScript.Geometry import *

import Autodesk.DesignScript.Geometry as geom

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
import Revit
from Autodesk.Revit.DB import *

def tolist(obj1):
	if hasattr(obj1,"__iter__"): return obj1
	else: return [obj1]

elem = UnwrapElement(IN[0])
flipEm = IN[1]

outList = []


def tolist(obj1):
	if hasattr(obj1,"__iter__"): return obj1
	else: return [obj1]

elems = tolist(UnwrapElement(IN[0]))

for elem in elems:
	if elem.CanFlipWorkPlane and elem.IsWorkPlaneFlipped == False:
		outList.append("The Work Plane is not Flipped")
	elif elem.CanFlipWorkPlane and elem.IsWorkPlaneFlipped == True:
		if flipEm == True:
			elem.IsWorkPlaneFlipped = False
			outList.append("Element is restored to its correct location")
			outList.append("The Work Plane is Flipped!")
		outList.append("Element cannot be flipped by its Workplane")

OUT = zip(elems,outList)


Thankyou this is exactly what i am after.
Will be excited the day when I have my head around python.

Thankyou everyone for the help!!


Hi everyone,

Thank you so much for this thread. It has been super useful to a beginner like me.

The question I have is that I can not make this script “FlipComponent.dyn” work with nested components. I get the status that those nested components that are flipped on the workplane are not. Whereas when I run this script inside the family where those components are located, I get that they are flipped, which is correct.

I would appreciate it if someone could help me to find a way to make this script work with nested components.