All Cadcorp SIS API Methods

SplitExtent Method

Description

Splits a comma-delimited extents string into numbers.

Syntax

Visual Basic
Public Function SplitExtent( _
   ByRef x1 As Double, _
   ByRef y1 As Double, _
   ByRef z1 As Double, _
   ByRef x2 As Double, _
   ByRef y2 As Double, _
   ByRef z2 As Double, _
   ByVal extent As String _
) As Boolean

Parameters

x1
The first x coordinate of the extents box.
 
y1
The first y coordinate of the extents box.
 
z1
The first z coordinate of the extents box.
 
x2
The second x coordinate of the extents box.
 
y2
The second y coordinate of the extents box.
 
z2
The second z coordinate of the extents box.
 
extent
The comma-delimited extents string to split, normally returned as a result of GetCoordExtent.

Return Type

Int    The possible return values are -1 or 0, which should be interpreted as true (-1) or false (0).

Remarks

This method passes the arguments x1, y1, z1, x2, y2 and z2 by reference, i.e. the method modifies the values, and the modified values are passed back to the caller. JavaScript and JScript do not allow arguments to be passed by reference. The code below shows how to split the string in these languages:

var s;
s = Sis.GetViewExtent();
var ss;
ss = s.split(",");
var x1,y1,z1,x2,y2,z2;
x1 = ss[0];
y1 = ss[1];
z1 = ss[2];
x2 = ss[3];
y2 = ss[4];
z2 = ss[5];

Example of the method for Python:

extent = sis.GetCoordExtent ("AGridNatGrid", "SP950130")
(x1, y1, z1, x2, y2, z2) = [float(x) for x in extent.split(',')]

Available: GEO D OD OM OV

Group:

Example

sis.SplitExtent (10, 33, 0, 34, -1, 0) sis.GetCoordExtent ("AGridNatGrid", "SP950130"))