RVTDocs.com
Namespace: Autodesk.Revit.DB Class: View3D

View3D.OrientTo

Method
Description:
Reorients the view to align with the forward direction.
Remarks:
This method adjusts the ViewOrientation to align with the input forward direction. The eye position will be automatically determined based on the shape of the viewing area and size of the model. The UpDirection will be aligned with the project Z axis.
Syntax
public void OrientTo(
	XYZ forwardDirection
)
Parameters
Parameter Type Description
forwardDirection XYZ The forward direction.
Return Value
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException forwardDirection has zero length.
InvalidOperationException View is locked and cannot be reoriented.