Retrieves a box that circumscribes all geometry of the element.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
| Visual Basic |
|---|
Public ReadOnly Property BoundingBox ( _
A_0 As View _
) As BoundingBoxXYZ
Get |
Remarks
Examples
CopyC#
private void GetElementBoundingBox(Autodesk.Revit.DB.Document document, Autodesk.Revit.DB.Element element)
{
BoundingBoxXYZ box = element.get_BoundingBox(document.ActiveView);
if (null == box)
{
throw new Exception("Selected element doesn't contain a bounding box.");
}
string info = "Bounding box is enabled: " + box.Enabled.ToString();
TaskDialog.Show("Revit",info);
}
CopyVB.NET
Private Sub GetElementBoundingBox(document As Autodesk.Revit.DB.Document, element As Autodesk.Revit.DB.Element)
Dim box As BoundingBoxXYZ = element.BoundingBox(document.ActiveView)
If box Is Nothing Then
Throw New Exception("Selected element doesn't contain a bounding box.")
End If
Dim info As String = "Bounding box is enabled: " & box.Enabled.ToString()
TaskDialog.Show("Revit", info)
End Sub
See Also