BoundingBoxXYZ.Transform
Public Property
The transform from the coordinate space of the box to the model coordinate space.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public Transform Transform { get; set; }
Property Value
TransformRemarks
The transform must always be right-handed and orthonormal.
Example
private void RotateBoundingBox(View3D view3d){ if (!view3d.IsSectionBoxActive) { TaskDialog.Show("Revit","The section box for View3D isn't active."); return; } BoundingBoxXYZ box = view3d.GetSectionBox();
// Create a rotation transform to apply to the section box XYZ origin = new XYZ(0, 0, 0); XYZ axis = new XYZ(0, 0, 1);
// Rotate 30 degrees Transform rotate = Transform.CreateRotationAtPoint(axis, Math.PI/6.0, origin);
// Transform the View3D's section box with the rotation transform box.Transform = box.Transform.Multiply(rotate);
// Set the section box back to the view (requires an open transaction) view3d.SetSectionBox(box);}