- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
section box rotation moves the view away from the section box and view cropped area. Is there a re-centre setting or something like this that needs to be applied similar to what is in the 3d GUI?
I did try the rotate view which works really well it's just that the edge of the section box does not align with the plane of the family instances unless the rotation is from orthogonal to the cardinal axis to another rotation that is orthogonal to the cardinal axes. This would mean users still have to rotate their section box to adjust the section box even though the view is perfectly facing forward in an isometric orientation.
private static void RotateBoundingBox(Document doc, View3D view3D, double frontAngle)
{
using (Transaction trans = new Transaction(doc, "Join Docs - rotate sectionbox"))
{
trans.Start();
BoundingBoxXYZ box = view3D.GetSectionBox();
if (false == box.Enabled)
{
TaskDialog.Show("Revit", "The section box for View3D isn't enabled.");
return;
}
XYZ origin = 0.5 * (box.Max - box.Min);
XYZ axis = XYZ.BasisZ;
Transform rotate = Transform.CreateRotationAtPoint(axis, frontAngle, origin);
box.Transform = box.Transform.Multiply(rotate);
view3D.SetSectionBox(box);
trans.Commit();
}
}
Solved! Go to Solution.