Hi @Nick_Boyts,
Schedules on sheet are part of the ScheduleSheetInstance class, whereas, Legends are viewport based View Elements. So, you are correct in what you say with Schedules, but not with Legends. Observe the following…
ViewPort.GetBoxCenter (Py)
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
def tolist(obj1):
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]
vps = tolist(UnwrapElement(IN[0]))
outList = []
for vp in vps:
outList.append(vp.GetBoxCenter().ToPoint())
OUT = outList
ScheduleSheetInstance.Point (Py)
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
def tolist(obj1):
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]
vps = tolist(UnwrapElement(IN[0]))
outList = []
for vp in vps:
outList.append(vp.Point.ToPoint())
OUT = outList
Legends however, as with drafting views, do not have a crop region like most other view type Elements. But both are viewport based when on sheet which means we can treat them like any other view type when placed on sheet (except for schedules and keynotes).
Cheers,
Dan