Elements Intersecting BoundingBox
Overview
The BoundingBoxIntersectsFilter()
detects all elements intersecting a bounding box. Elements in contact with the box are selected.
Example
-
Get the bounding box of a specific element:
Elements = UnwrapElement(IN[0])
bb = Elements.get_BoundingBox(doc.ActiveView) -
Construct the outline of the bounding box:
outline = Outline(bb.Min, bb.Max)
-
Apply the filter to collect elements intersecting the bounding box:
Elements = FilteredElementCollector(doc).WherePasses(BoundingBoxIntersectsFilter(outline)).ToElements()
Note
The filtering behavior may vary depending on the view provided.