The transform from the coordinate space of the box to the model coordinate space.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public Transform Transform { get; set; }Property Value
Transform
Remarks
The transform must always be right-handed and orthonormal.
Example
C#
private void RotateBoundingBox(View3D view3d)
{
if (!view3d.IsSectionBoxActive)
{
TaskDialog.Show("Revit","The section box for View3D isn't active.");
return;
}
BoundingBoxXYZ box = view3d.GetSectionBox();
XYZ origin = new XYZ(0, 0, 0);
XYZ axis = new XYZ(0, 0, 1);
Transform rotate = Transform.CreateRotationAtPoint(axis, Math.PI/6.0, origin);
box.Transform = box.Transform.Multiply(rotate);
view3d.SetSectionBox(box);
}
VB
Private Sub RotateBoundingBox(view3d As View3D)
If Not view3d.IsSectionBoxActive Then
TaskDialog.Show("Revit", "The section box for View3D isn't active.")
Return
End If
Dim box As BoundingBoxXYZ = view3d.GetSectionBox()
Dim origin As New XYZ(0, 0, 0)
Dim axis As New XYZ(0, 0, 1)
Dim rotate As Transform = Transform.CreateRotationAtPoint(axis, Math.PI / 6.0, origin)
box.Transform = box.Transform.Multiply(rotate)
view3d.SetSectionBox(box)
End Sub
See Also
Reference