SclViewport getViewScale
Overview
You use this command to find the scale for the viewport in the x, y, and z directions.
Synopsis
SclViewport getViewScale <$viewportHandle> <x> <y> <z>
Description
Get the view scale for the viewport referred to by the handle. The scale values for the viewport are specified in each direction by the parameters x, y, and z. These parameters can be Tcl variables.
Arguments
- getViewScale
- <$viewportHandle>
- <x>
- <y>
- <z>
A literal string to identify the function.
The reference handle to the viewport to get the view scale of.
Returns the viewing scale in the x axis direction.
Returns the viewing scale in the y axis direction.
Returns the viewing scale in the z axis direction.
Returns
If successful, this command returns $SCL_OK. If the viewport handle is not valid, an error message is returned.
Examples
# Get and set the view scale for a viewport set vp [SclViewport getActive] SclViewport getViewScale $vp xScale yScale zScale puts "Current viewing scale is X=$xScale ; Y=$yScale ; Z=$zScale" # exaggerate the Y scale SclViewport setViewScale $vp $xScale [expr $yScale * 2] $zScale SclViewport getViewScale $vp xScale yScale zScale puts "Viewing scale now X=$xScale ; Y=$yScale ; Z=$zScale" |