Hello,
I take references that I find with the ReferenceIntersector, then I find the element ID and try to obtain the BoundingBox Min/Max points.
But apparently I can’t get the BoundingBox from the FamilyInstance, and I need to somehow convert it to the actual Element object.
for ref in referenceWithContext:
e = doc.GetElement(ref.GetReference()) # get the element
print(e.Id) # prints correctly
bbox = e.BoundingBox
print(bbox) # prints <indexer# object at 0x0000000000000241>
I’ve found this but it didn’t offer a lot of help:
Any ideas on how to get the bbox from the element?
Hi, thanks @Giuseppe_Dotto that was it!
It seems very hard to figure out Python syntax for Revit API C# methods sometimes…
For example, another syntax that I can’t figure out is how to create a NewPlane(XYZ,XYZ) in Python. Is there some way to know how to define these things?
Hi @AH_Yafim ,
I know that at the beginning might seem a little bit difficult to understand how to diving in the API but after a while, and looking at the right references and forums, everything will be more affordable.
Thanks,
Sometimes the Revit API Docs are slightly different than the ApiDocs.co.
I was referring to the Python implementation, which doesn’t always work as in the case for the .get_BoundingBox(None) solution.