public static BoundingBox Bounds(this IElement2D element2D) { List <ICurve> elementCurves = element2D.ElementCurves(true); if (elementCurves.Count == 0) { return(null); } BoundingBox box = Geometry.Query.IBounds(elementCurves[0]); for (int i = 1; i < elementCurves.Count; i++) { box += Geometry.Query.IBounds(elementCurves[i]); } return(box); }