Click or drag to resize
CEMAPiGetGrid Method
Position and size a grid on a map.

Available since Oasis montaj version: 5.0
Limitations: May not be available if running outside of a Oasis Montaj or from a command line program.  
License: Available to anyone.  

Namespace: Geosoft.Desktop.GXNetX
Assembly: geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll)
Notes
If the input angle is &lt;define&gt;rDUMMY&lt;/define&gt;, an extra step is inserted for the user to define the angle by drawing a line with the mouse. The output primary axis angle will always be in the range -90 < angle <= 90. The grid origin is shifted to whichever corner necessary to make this possible, while keeping the secondary axis at 90 degrees greater than the primary ( going counter-clockwise). The coordinates are returned in the current User projection (See GetUserIPJ_MVIEW and SetUserIPJ_MVIEW.)
Syntax
public int iGetGrid(
	string str_val,
	int nx,
	int ny,
	ref double angle,
	ref double x1,
	ref double y1,
	ref double x_len,
	ref double y_len
)

Parameters

str_val
Type: SystemString
User prompt string
nx
Type: SystemInt32
Number of elements along primary axis to draw.
ny
Type: SystemInt32
Number of elements along secondary axis to draw.
angle
Type: SystemDouble
Angle of primary axis in degrees
x1
Type: SystemDouble
Grid origin X
y1
Type: SystemDouble
Grid origin Y
x_len
Type: SystemDouble
Primary axis length
y_len
Type: SystemDouble
Secondary axis length

Return Value

Type: Int32
0 if line returned. 1 if user cancelled.
See Also