Description | Example | Return message | Group

VO ViewFromTo

Set parameters for the view in a 3D window (simplified form).

Syntax

VO <ScenarioPath> ViewFromTo {ViewOptions} <Parameters>

Related commands

Description

The VO ViewFromTo command enables you to set several 3D viewing parameters for a 3D window. These parameters are typically controlled from the View From Position and View To Direction dialog.

The VO ViewFromTo command provides a simplified method for creating and modifying simple views. To create more complex views use the VO View command. To create views using Vectors use the VO ViewAlongDirection command.

{ViewOptions} <Parameters>Description
Normal From <FromViewObject> [To <ToViewObject>] [WindowID <WinNumber>]Create a view with a from object, and optionally, a to object.
UnTethered [SystemDef "<SystemDef>"] [WindowID <WinNumber>] Create an Unthethered view. "<SystemDef>" is defined as follows: "Name <Name> {CBName <CbName> | Object <TruncObjectPath>}"
Parameters {Keyword} <Value> [{Keyword} <Value>...] Set additional parameters for a view. See tables below for details.
Advanced {Keyword} <Value> [{Keyword} <Value>...] Set parameters from the View FromTo Advanced panel. See tables below for details.
Reset [WindowID <WinNumber>]Reset the View to its current settings.

After setting the parameters for the view, send this command to update the 3D Graphics window.

Normal {ViewOptions}

Valid values for <FromViewObject> and <ToViewObject> are:

<ViewObject>Description
<TruncObjectPath>A truncated STK object path.

The Star object is not valid for this command. To set a view using a Star object see the VO ViewAlongDirection

<CentralBodyPath>A central body object path, formatted as CentralBody/<CbName>, for example: CentralBody/Earth. This mode is not valid for an Attitude VO window.
LLAThis will set your view to Latitude. Longitude, Altitude mode. The "To <ViewObject>" is not required, and will be ignored if entered. This mode is not valid for an Attitude VO window. To set the position for this view mode use the VO ViewFromTo Advanced command with the Position option (described below).
"<ReferencePoint>"Specify a VGT point as the to or from object. Format for this option is "<TruncObjectPath> <Name> Point", where <TruncObjectPath> is a truncated object or central body path, and <Name> is the Point name.
"<ImageFile>"Specify the path and file name of an imagery file. The file specified must already be loaded in the Globe Manager.

If the {ViewOptions} is Normal, and the To <ToViewObject> is omitted, then the view's to object will be set as follows:

If <FromViewObject> is:To Object will be set to:
<TruncObjectPath>The same object
<CentralBodyPath>Central Body View to the same central body.
LLALLA

Parameters {ViewOptions}

If the {ViewOptions} is Parameters, and following table describes the {Keyword} <Value> pairs.

{Keyword} <Value>Description
UpVector {x | y | z | -x | -y | -z}Set which axis of the selected reference frame should be fixed pointing vertical in the 3D window, when UseUpVector is turned on.
UseUpVector {On | Off}If turned on, indicate that the selected axis of the selected reference frame should be fixed pointing vertical in the 3D window.
LockDirection {On | Off}If set to On this will disable rotation in the scene, although some rotation will still be possible if UseUpVector is Off.
Distance {From | To | Off} [<Distance>]If set to From or To, indicate the distance from which the view From position or the view To direction will be calculated. <Distance> is entered in Connect distance units.
RotateOverTop {On | Off}If set to On, and the UseUpVector is turned On, the camera is allowed to rotate over the top of the up vector.
ShowTrackBall {On | Off}Only available if UseUpVector is turned Off. When using a virtual track ball, the left mouse button enables you to rotate freely about the viewed object when in the center of the window. Towards the edges of the scene, using the left mouse button, twist around the viewed object. If turned On, the boundary of these two regions is shown.
WindowID <WinNumber>The VO window in which to set the parameters.

Advanced {ViewOptions}

If the {ViewOptions} is Advanced, and following table describes the {Keyword} <Value> pairs.

{Keyword} <Value>Description
Position <Lat> <Lon> <Alt>Modify the position of the Latitude, Longitude, Altitude View mode. <Lat> and <Lon> are entered in degrees. <Alt> is entered in Connect distance units.

To use this option the mode must already be set to LLA View Mode.

PositionFilename "<Filename>"Modify the position of the Latitude, Longitude, Altitude View mode using the entered file. The file should be one of the following types: pdtt or pdttx. The Latitude and Longitude are set to the center of the file, the Altitude will be set to 0.

To use this option the mode must already be set to LLA View Mode.

TrackBallRadius <Radius>Specifies the size of the virtual track ball. <Radius> is a value between 0.0 and 100.0.
SlowRotation {On | Off}If turned On, this will slow down the rotation rate when close to the view object.
UnTethered InitAltitude {Default | Current | System}Controls the camera's initial position and orientation.
UnTethered Speed <Speed>Set the speed of the camera in Untethered view mode. <Speed> is a value greater than 0.0.
UnTethered AlignView {On | Off}If turned on this will align the untethered view direction with the system's origin.
UnTethered SystemDef "Name <SystemName> {CBName <CentralBodyName> | Object <SystemObjectName>}"Set the view mode to untethered, using a reference system.
ConstrainRotation {Reference | Screen}If set to Reference this will constrain rotation about the reference axes specified in the Reference Frame field on the View/From To screen. If set to Screen this will constrain rotation about the screen axes.
WindowID <WinNumber>The VO window in which to set the parameters.

Examples

Set a view from Satellite1 to the Earth:

VO * ViewFromTo Normal From Satellite/Satellite1 To CentralBody/Earth

Set the view mode to untethered:

VO * ViewFromTo Untethered

Set the view mode to untethered, defining Earth Fixed as the reference system:

VO * ViewFromTo Untethered SystemDef "Name Fixed CBName Earth"

Turn on constrained rotation about the positive Y Vector:

VO * ViewFromTo Parameters UpVector Y UseUpVector On

To set view parameters for VO window 1:

VO * ViewFromTo Parameters RotateOverTop On LockDirection Off WindowID 1

To set advanced view parameters for untethered mode:

VO * ViewFromTo Advanced UnTethered InitAltitude Current UnTethered Speed 3.6

To set the position for LLA view mode, first set the mode to LLA and then set the position using the Advanced Position option:

Setunits / km
VO * ViewFromTo Normal From LLA
VO * ViewFromTo Advanced Position 23 -45 300.0

To set the view from the Earth's Center Point to the Satellite:

VO * ViewFromTo Normal From "CentralBody/Earth Center Point" To Satellite/Satellite1

To specify an image file for the view:

VO * ViewFromTo Normal From "C:\STKUser\Config\CentralBodies\Earth\GeoData\SatImage.jp2"

Return message

Group membership

This command belongs to the following group(s):

Attitude

VO

VO Objects

Version

9.2