Splits a comma-delimited extents string into numbers.
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 |
Int
|
The possible return values are -1 or 0, which should be interpreted as true (-1) or false (0). |
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 MM ME MD OD OM OV
Group:
sis.SplitExtent (10, 33, 0, 34, -1, 0) sis.GetCoordExtent ("AGridNatGrid", "SP950130"))
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).