GetCentroid

XYZ? GetCentroid(this Element element, View? view = null)

Returns the centroid (midpoint) of the element's bounding box, or null if unavailable.

Parameters

  • elementElement

    The element to inspect.

  • viewView?

    Optional view context.

Returns: The bounding-box centroid, or null if unavailable.

Example

XYZ? c = element.GetCentroid();