TryGetBoundingBox

bool TryGetBoundingBox(this Element element, out BoundingBoxXYZ boundingBox, View view = null)

Tries to get the bounding box of the element.

Parameters

  • elementElement

    The element to inspect.

  • boundingBoxout BoundingBoxXYZ

    Outputs the bounding box if available.

  • viewView

    Optional view context.

Returns: True if the bounding box was found; otherwise false.

Example

if (element.TryGetBoundingBox(out var box))
{
TaskDialog.Show("BBox", $"Min: {box.Min} / Max: {box.Max}");
}