BoundingBoxUV Class

A two-dimensional rectangle, parallel to the coordinate axes.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBBoundingBoxUV

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class BoundingBoxUV : IDisposable

The BoundingBoxUV type exposes the following members.

Constructors
 NameDescription
Public methodBoundingBoxUVdefault constructor
Public methodBoundingBoxUV(Double, Double, Double, Double)Creates object with supplied values.
Top
Properties
 NameDescription
Public propertyBoundsIndexed access for loops. Use 0 for Min and 1 for Max.
Public propertyIsSetIndicates whether the BoundingBoxUV is set or not.
Public propertyMaxMaximum coordinates (upper-right corner of the box).
Public propertyMinMinimum coordinates (lower-left corner of the box).
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the BoundingBoxUV
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Example
Document doc = application.ActiveUIDocument.Document;
FilteredElementCollector collector = new FilteredElementCollector(doc);
ICollection<Element> collection = collector.OfClass(typeof(Autodesk.Revit.DB.View)).ToElements();
foreach (Element element in collection)

{
    Autodesk.Revit.DB.View view = element as Autodesk.Revit.DB.View;
    if (null != view)
    {
        string messageInfo = "BoundingBoxUV : ";
        messageInfo += "\nView name : " + view.Name;
        BoundingBoxUV boundingBox = view.Outline;
        // Get max bounding box
        UV max = boundingBox.Max;
        messageInfo += "\nMax boundingbox : (" + max.U + "," + max.V + ")";
        // Get min bounding box
        UV min = boundingBox.Min;
        messageInfo += "\nMin boundingbox : (" + min.U + "," + min.V + ")";
        // Get bounds,
        // Use 0 for Min and 1 for Max
        UV bound = boundingBox.get_Bounds(0);
        messageInfo += "\nBoundingbox bounds : (" + bound.U + "," + bound.V + ")";
        TaskDialog.Show("Revit",messageInfo);
    }
}
See Also