what does dynamo do differently to get the door geometry. Im assuming it has something to do with excluding the lines that make up the door swing. I don’t even know if this is the right place to post this but i use dynamo all the time and im starting to use C# to make plugins. Please let me know if you can help.
Exactly. A family element already has bounds based on the objects inside it, even if they don’t have geometry (think reference planes). BoundingBox.ByGeometry specifically only looks at physical geometry (it may not even be from Revit elements).
I don’t know much about Revit Bounding Boxes so I can only guess. I don’t think you can create a BoundingBoxXYZ from a list of geometries. I think you would have to filter your door geometries to Solids only and get the Bounding Boxes of each individual geometry. Then you could determine the overall minimum and maximum point for those geometries and create a new BoundingBoxXYZ from those.
I’ve been trying to find example code for doors because every time to try it doesn’t find any solids and just returns an error.
Maybe someone could point me to a good example