HI @n.dull I’m going to have to get Autodesk to look into this as it seems there may be a bug in the Revit API using C# Element.get_BoundingBox() method.
Assemblies do have valid bounding boxes and I’ve verified this through Revit Lookup so this node should work - the OOTB node should also work, but that fails too. However, using Python which can use an alternative property accessor to obtain the bb (C# doesn’t have this option available) works without issue. The only other issue if going down the Python route is the bb will be in its source document location, not its host location, like what BimorphNodes LinkElement bb node does. If my theory is correct then unfortunately there wont be a fix until Autodesk investigate, confirm and patch it.
EDIT: I’ve done more tests and found the source of the problem. The get_BoundingBox() takes a view as an input. In almost all cases, its unnecessary to provide the view, so like the OOTB node, I simply input null and save myself - and the user - the hassle of providing a view. However, its seems that assemblies need a view input otherwise the bb extraction fails. I’ll get this updated in the next release of BimorphNodes which should be out within the next few weeks.
# Import DocumentManager and TransactionManager
from RevitServices.Persistence import DocumentManager
# Import RevitAPI
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
assembly = UnwrapElement(IN) #input a single element, not a list
linkInstance = UnwrapElement(IN) #input a single element, not a list
linkDoc = linkInstance.GetLinkDocument()
view = FilteredElementCollector(linkDoc).OfClass(View3D).WhereElementIsNotElementType().FirstElement()
OUT = assembly.BoundingBox[view] .ToProtoType()