and the python script: (copy and paste in a python node)
# provided by johnp of sixtysecondrevit.com
# python template from clockwork
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
def GetLocation(item):
# if it has a calculation point return that
if item.HasSpatialElementCalculationPoint : return item.GetSpatialElementCalculationPoint().ToPoint()
# if not return the regular location
elif item.Location.GetType().ToString().Contains("LocationPoint") : return item.Location.Point.ToPoint()
else: return None
items = UnwrapElement(IN[0])
if isinstance(IN[0], list): OUT = [GetLocation(x) for x in items]
else: OUT = GetLocation(items)
amazing, I would love to have this simple node as OOTB node as well, because by default it only picks the Location Point, not the green point of the family (Room Calculation Point). Funny to have a family with geometry at high level of a room and its location detected is on the floor.