SetScale Method

See Also Applies To Example Model

Defines the coordinate system scale relative to the edges for the Screen display area.

object expression.SetScale (ScaleLeft, ScaleBottom, ScaleRight, ScaleTop)

object expression    Required. An object expression that evaluates to an object in the Applies To list.

ScaleLeft    Required Double. The world system x coordinate corresponding the lower-left corner of the screen.

ScaleBottom    Required Double. The world system y coordinate corresponding the lower-left corner of the screen.

ScaleRight    Required Double. The world system x coordinate corresponding the upper-right corner of the screen.

ScaleTop    Required Double. The world system y coordinate corresponding the upper-right corner of the screen.

Remarks

The SetScale Method is used to define the simulation coordinate system. The method works by identifying the    lower-left and upper-right corners of the screen display with the desired simulation coordinates. The default coordinate system is 100 units wide by 100 units high, with the origin (0,0) in the center of the screen. It is important to note that all distances and object dimensions are relative to the coordinate system that you define through the SetScale method, including text and shape sizes. The coordinate system axes can be displayed using the Show method of the Axes object.

Example

The following example sets the scale of the Screen display and then reports to the coordinates of each of the display edges to the debug window.

World.Screen.SetScale -1000, -500, 1000, 1500
Debug.Print World.Screen.ScaleLeft    'Prints -1000
Debug.Print World.Screen.ScaleRight    'Prints 1000
Debug.Print World.Screen.ScaleBottom    'Prints -500
Debug.Print World.Screen.ScaleTop    'Prints 1500