Room Location Point of a family, the green dot

is possible to find the green dot of the family with Dynamo instead of finding the family point that is aligned around the project level as usual?

In this example dot is at 1600mm height from the level but family location point height is at -0.05mm, is possible to get the green dot with Dynamo?

You can get that location with the API.

Here is a python script that will:

  • Check if the family has a spatial element point (green dot)
  • if it does have it, it will return the “green dot” location.
  • if not it will return the default family location (origin).

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)
8 Likes

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.

This does not work for ductwork pipes, how to get the room number later

1 Like