Revit 2015 API |
BoundingBoxXYZ..::..Transform Property |
BoundingBoxXYZ Class Example See Also |
The transform FROM the coordinate space of the box TO the model space.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
Remarks
The transform must always be right-handed and orthonormal.
Examples

private void RotateBoundingBox(View3D view3d) { BoundingBoxXYZ box = view3d.GetSectionBox(); if (false == box.Enabled) { TaskDialog.Show("Revit","The section box for View3D isn't enabled."); return; } // Create a rotation transform, XYZ origin = new XYZ(0, 0, 0); XYZ axis = new XYZ(0, 0, 1); // Rotate 2 radians Transform rotate = Transform.CreateRotationAtPoint(axis, 2, origin); // Transform the View3D's GetSectionBox() with the rotation transform box.Transform = box.Transform.Multiply(rotate); view3d.SetSectionBox(box); }

Private Sub RotateBoundingBox(view3d As View3D) Dim box As BoundingBoxXYZ = view3d.GetSectionBox() If False = box.Enabled Then TaskDialog.Show("Revit", "The section box for View3D isn't enabled.") Return End If ' Create a rotation transform, Dim origin As New XYZ(0, 0, 0) Dim axis As New XYZ(0, 0, 1) ' Rotate 2 radians Dim rotate As Transform = Transform.CreateRotationAtPoint(axis, 2, origin) ' Transform the View3D's GetSectionBox() with the rotation transform box.Transform = box.Transform.Multiply(rotate) view3d.SetSectionBox(box) End Sub