Room Location Point of a family, the green dot

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