Using this on a Room Element, python returns a
IronPyton.Runtime.Types.ReflectedIndexer
from which I can get the Max or Min points.
import clr
# import Revit Services
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
# import Revit API
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
rooms=FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).ToElements()
bbox = rooms[0].BoundingBox
#bbMax=bbox.Max
OUT=bbox
This post on stackoverflow includes a function get_BoundingBox, which is not in the Revit API library. I have not seen an ‘_’ used in function names so suspect this is part of pyRevit?.
el_bb = el_ID.get_BoundingBox(doc.ActiveView)
I would like to be able to get the bounding box of the element using Python.