Description | Example | Return message | Group

Window2D_R

Return information about a 2D Graphics window

Syntax

Window2D_R <ScenarioPath> {DataType} {DataTypeOptions} [WindowId <WinNumber>]

Related commands

Description

The Window2D_R command will return information about a 2D Graphics window.

Valid {DataType} option is ProjectedPos or Property.

Enter the WindowId <WinNumber> to specify a 2D Graphics window. If not entered, then window 1 is used.

If {DataType} option is ProjectedPos then the command will return the Pixel coordinates (x, y where the upper left corner of the window is 0,0) or Screen coordinates (zoom coordinates) of the specified latitude, longitude point. The command will nack if the lat-lon is not visible on the screen.

The following table describes the valid {DataTypeOptions} for {DataType} ProjectedPos.

{DataTypeOptions}Description
Lat <LatValue>Enter the latitude value of the point in degrees.

This value is required.

Lon <LonValue>Enter the longitude value of the point in degrees.

This value is required.

Alt <AltValue>Enter the Altitude value in Connect distance units. Enter this value if the map is in the perspective or orthographic projection.
Coord {Pixel | Screen}Specify whether to return coordinates as Pixel or Screen. If not entered then Pixel is returned.

If {DataType} option is Property then the command will return information about the 2D window.

The following table describes the valid {DataTypeOptions} for {DataType} Property.

{DataTypeOptions}Description
SizeReturns the size of the 2D Graphics window including borders and frame.
InnerSizeReturns the size of the 2D Graphics window not including borders or frame.

Examples

Return the pixel coordinates for the specified latitude, longitude position:

Window2d_R * ProjectedPos Lat 45.0 Lon -135.0

Return message

Return the X and Y pixel position:
94 124

Examples

On a window whose projection is set to perspective, get the pixel coordinates:

Window2d_R * ProjectedPos Lat 0.0 Lon -43.5 Alt 1000000

Return message

Return the X and Y pixel position:
333 196

Examples

Return the size of the first 2d window (not including border and frame):

Window2d_R * Property InnerSize

Return message

Returns the width and height:
640 360

Examples

Return the size of the second 2d window:

Window2d_R * Property Size WindowID 2

Return message

Returns the width and height:
687 364

Group membership

This command belongs to the following group(s):

2D Graphics Window

Version

9.0