SML 関数解説 for TNTmips ver6.6

SML module date: Nov 28 2001

  • Math
  • Date
  • Set
  • String
  • Database
  • Raster
  • Vector
  • Object
  • Matrix
  • Georeference
  • Color Palette
  • Style
  • System
  • Object Conversion
  • Popup Dialog
  • CAD
  • TIN
  • Region
  • File
  • Ini File
  • Movie
  • Import Export
  • Raster Morphological
  • Raster Focal
  • Raster Global
  • Vector Toolkit
  • Raster Classification
  • Console
  • Drawing
  • Widget
  • Status
  • Raster Watershed
  • Frame
  • Surface Fitting
  • Geodata Display View
  • Geodata Display Layout
  • Geodata Display Group
  • Geodata Display
  • GPS
  • Vector Network
  • Database Editor

    Math functions (66)


    abs(x)

    Absolute value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = -6
         b = abs(2 * a)   # b = 12
         print(b)
    


    acos(x)

    trigonometric arccosine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         b = acos(0.5)
         print(b)
         # b = 1.0471975511965979
    


    acosd(x)

    trigonometric arccosine (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    acosh(x)

    hyperbolic arccosine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         b = acosh(0.5)
         print(b)
         # b = NULL
    


    acoth(x)

    hyperbolic arccotangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         b = acoth(0)
         print(b)
         # b = NULL
    


    acsch(x)

    hyperbolic arccosecant

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         b = acsch(0)
         print(b)
         # b = Infinity
    


    asech(x)

    hyperbolic arcsecant

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         b = asech(1)
         print(b)   # b = 0
    


    asin(x)

    trigonometric arcsine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = sqrt(3) / 2
         b = deg * asin(a)
         print(b)
         # b = 59.99999999999999
    


    asind(x)

    trigonometric arcsine (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    asinh(x)

    hyperbolic arcsine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = (exp(0) - exp(-0)) / 2
         b = asinh(a)
         print(b)   # b = 0
    


    atan(x)

    trigonometric arctangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = 1 ; b = deg * atan(a)
         print(b)   # b = 45
    


    atan2(y, x)

    trigonometric arctangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = sqrt(3) / 2 ; b = -.5
         c = deg * atan2(a, b)
         print(c)   # c = 120
    


    atand(x)

    trigonometric arctangent (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    atanh(x)

    hyperbolic arctangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = exp(0) - exp(-0)
         b = exp(0) + exp(-0)
         c = atanh(a/b)
         print(c)   # c = 0
    


    Bound(val, min, max)

    Force a value into given range.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of Bound()
    


    ceil(x)

    Round decimal up to integer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a = ceil(7.499)   # a = 8
         b = ceil(7.001)   # b = 8
         c = ceil(-7.01)   # c = -7
         d = ceil(-7.99)   # d = -7
         print(a, b, c, d)
    


    ConvertPolartoXY(theta, r, x, y)

    Converts polar coordinates to rectangular (radians).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertPolartoXY()
    


    ConvertPolartoXYd(theta, r, x, y)

    Converts polar coordinates to rectangular (degrees).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertPolartoXYd()
    


    ConvertSphericaltoXYZ(rho, theta, phi, x, y, z)

    Converts polar coordinates to rectangular (radians).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertSphericaltoXYZ()
    


    ConvertSphericaltoXYZd(rho, theta, phi, x, y, z)

    Converts polar coordinates to rectangular (degrees).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertSphericaltoXYZd()
    


    ConvertXYtoPolar(x, y, theta, r)

    Converts rectangular coordinates to polar (radians).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertXYtoPolar()
    


    ConvertXYtoPolard(x, y, theta, r)

    Converts rectangular coordinates to polar (degrees).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertXYtoPolard()
    


    ConvertXYZtoSpherical(x, y, z, rho, theta, phi)

    Converts rectangular coordinates to spherical (radians).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertXYZtoSpherical()
    


    ConvertXYZtoSphericald(x, y, z, rho, theta, phi)

    Converts rectangular coordinates to spherical (degrees).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertXYZtoSphericald()
    


    CopyArrayElements(dest, source, dest_start, dest_end, source_start, source_end)

    Copies a given range of elements form one array into another.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         clear();
         Array a1[10];
         Array a2[10];
         for x=1 to 10{
         	a1[x]=20+x;
         	a2[x]=x;
         }
         CopyArrayElements(a2,a1,3,6,5,8);
         for x=1 to 10{
         	print(a2[x]);
         }
    


    cos(x)

    trigonometric cosine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(cos(60 / deg))   # prints .500000000000001
    


    cosd(x)

    trigonometric cosine (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    cosh(x)

    hyperbolic cosine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(cosh(0))   # prints 1
    


    csc(x)

    trigonometric cosecant

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(csc(30 / deg))   # prints 2
    


    cscd(x)

    trigonometric cosecant (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    ctn(x)

    trigonometric cotangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(ctn(0 / deg))   # prints Infinity
    


    ctnd(x)

    trigonometric cotangent (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    Displacement3D(x1, y1, z1, x2, y2, z2, distance, azimuth, elevation)

    Calculate the distance, azimuth, and elevation from the first point to the second (radians).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of Displacement3D()
    


    Displacement3Dd(x1, y1, z1, x2, y2, z2, distance, azimuth, elevation)

    Calculate the distance, azimuth, and elevation from the first point to the second (degrees).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of Displacement3Dd()
    


    exp(x)

    Exponential (e to the power of x)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(exp(-1/0))   # prints 0
    


    exp10(x)

    Exponential (10 to the power of x)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(exp10(3))   # prints 1000
    


    floor(x)

    Round decimal down to integer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(floor(7.5))   # prints 7
         print(floor(-7.5))   # prints -8
    


    GetUnitConvAngle(from$, to$)

    Get scale factor for angle unit conversions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetUnitConvAngle()
    


    GetUnitConvArea(from$, to$)

    Get scale factor for area unit conversions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetUnitConvArea()
    


    GetUnitConvDist(from$, to$)

    Get scale factor for distance unit conversions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetUnitConvDist()
    


    GetUnitConvVolume(from$, to$)

    Get scale factor for volume unit.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetUnitConvVolume()
    


    hypot(dx, dy)

    Find hypotenuse of right triangle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear(); dx = 3; dy = 4
         print(hypot(dx, dy))   # 5
    


    int(x)

    Integer portion of argument (truncate)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         a = int(7.7)   # a = 7
         a = int(-7.7)   # a = -8
    


    IsNull(x)

    Does the argument have the value NULL?

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(IsNull(NULL))
    


    LinearRegression(x, y, num, slope, intercept, omit)

    Calculate the linear regression coeficients for a group of points.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LinearRegression()
    


    log(x)

    Natural logarithm of argument

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Enter a number.") ; a=input
         print("log(x)=", log(x))
    


    log10(x)

    Base 10 logarithm of argument

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Enter a number.") ; a=input
         print("log10(x)=", log10(x))
    


    PolynomialCurveFit(x, y, num, power, carray, r)

    Computes an equation of given power that best fits the given points.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of PolynomialCurveFit()
         clear();
         array xpoints[4];
         array ypoints[4];
         array carray[3];
         xpoints[1]=-1;
         xpoints[2]=0;
         xpoints[3]=1;
         xpoints[4]=2;
         ypoints[1]=4;
         ypoints[2]=10;
         ypoints[3]=20;
         ypoints[4]=34;
         string$=PolynomialCurveFit(xpoints,ypoints,4,2,carray,r);
         printf("%s\n",string$);
         printf("%f %f %f\n",carray[1],carray[2],carray[3]);
         printf("r = %f\n",r);
    


    pow(x, y)

    return x to the power of y

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(pow(2, 3))   # 8
    


    rand(x)

    Returns random value between zero (0) and x

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         print(rand(1))
    


    RandomGaussian(mu, sigma, x1, x2)

    Computes a pair of random numbers based on a normal distibution.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RandomGaussian()
    


    ResizeArrayClear(array, index1Size, index2Size)

    Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 08-Oct-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ResizeArrayClear()
     
           array a[3];
           array a2[3, 4];
     
           ResizeArrayClear(a, 5); # increase size of one dimensional array
           ResizeArrayClear(a, 2); # decrease size of one dimensional array
     
           ResizeArrayClear(a2, 5, 6); # increase size of two dimensional array
           ResizeArrayClear(a2, 2, 3); # decrease size of two dimensional array
    


    ResizeArrayPreserve(array, index1Size, index2Size)

    Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 08-Oct-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ResizeArrayPreserve()
     
           array a[3];
           array a2[3, 4];
     
           ResizeArrayPreserve(a, 5); # increase size of one dimensional array
           ResizeArrayPreserve(a, 2); # decrease size of one dimensional array
     
           ResizeArrayPreserve(a2, 5, 6); # increase size of two dimensional array
           ResizeArrayPreserve(a2, 2, 3); # decrease size of two dimensional array
    


    round(x)

    Round x to nearest integer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         print(round(10.5))   # 11
         print(round(-10.5)   #-10
    


    sec(x)

    trigonometric secant

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         print(sec(60/deg))
    


    secd(x)

    trigonometric secant (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    Sign(x)

    Return -1, 0 or 1 depending on sign of argument

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jun-2000
    Modify Date: none
    Available in SML for Windows: Yes


    sin(x)

    trigonometric sine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(sin(30/deg))   #.5
    


    sind(x)

    trigonometric sine (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    sinh(x)

    hyperbolic sine

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(sinh(0))   # 0
    


    Solve(coefArray, constArray, result)

    Gaussian elimination solution of system of linear equations

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         array a[2, 2] ; array b[2] ; array x[2]
         a[1,1]=1 ; a[1,2]=0 ; a[2,1]=1; a[2,2]=1
         b[1]=1; b[2]=1
         Solve(a, b, x)
         print(x[1], x[2])
    


    sqr(x)

    Return the square of the argument

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(sqr(-3))   # 9
    


    sqrt(x)

    Returns the (positive) square root of the argument

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(sqrt(9))   # 3
         print(sqrt(-9))   # 0
    


    tan(x)

    trigonometric tangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          clear()
          print(tan(90/deg))   # -2147483648 (roundoff error)
    


    tand(x)

    trigonometric tangent (degree version)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    tanh(x)

    hyperbolic tangent

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          clear()
          print(tanh(0))   # 0
    


    Date functions (6)


    Date()

    Returns the current date in YYYYMMDD format

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         x=Date() ; print(x)
    


    DateDiff(yyyymmdd1, yyyymmdd2)

    Returns number of days between two dates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         x=DateDiff(19960101, 19970101)
         print(x)   # 365
    


    DateToJulian(yyyymmdd)

    Converts YYYYMMDD format to Julian date

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         x=DateToJulian(19960101)
         print(x) ; print(JulianToDate(x))
    


    DateToString(yyyymmdd, format$)

    Convert a number date to a string.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DateToString()
    


    JulianDate()

    Returns the current Julian date

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         x=JulianDate() ; print(x)
    


    JulianToDate(julian)

    Converts Julian date to YYYYMMDD format

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         x=DateToJulian(19960101)
         print(x) ; print(JulianToDate(x))
    


    Set functions (11)


    SetMajority(x1, x2, ...)

    Most frequently occurring value among arguments

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetMajority(1, 3, 3, 4, 4, 5))   # prints 3
    


    SetMax(x1, x2, ...)

    Returns the largest of argument values

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetMax(1, 3, 3, 4, 4, 5))   # prints 5
    


    SetMean(x1, x2, ...)

    Returns average of argument values

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetMean(1, 3, 5))   # prints 3
    


    SetMedian(x1, x2, ...)

    Returns the median of argument values

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetMean(1, 3, 7))   # prints 3
    


    SetMin(x1, x2, ...)

    Returns minimum value among arguments

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetMean(1, 3, 5))   # prints 1
    


    SetMinority(x1, x2, ...)

    Least frequently occurring value among arguments

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetMinority(1, 3, 3, 4, 4, 5))   # prints 1
    


    SetNum(x1, x2, ...)

    Returns the total number of elements

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetNum(2, 1, 3, 4, 99))   # returns 5
    


    SetSD(x1, x2, ...)

    Returns standard deviation of argument values

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetSD(2, 1, 3, 4, 99))
    


    SetSum(x1, x2, ...)

    Returns sum of arguments

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetSum(2, 1, 3, 4, 99))   # prints 109
    


    SetVariance(x1, x2, ...)

    Returns statistical variance of argument values

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetVariance(2, 1, 3, 4, 99))
    


    SetVariety(x1, x2, ...)

    Returns number of different values among arguments

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print(SetVariety(2, 1, 3, 4, 99))
    


    String functions (15)


    DegToStr(num)

    Convert an angle in degress to an angle in degress, minutes, seconds format.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear();
         print(DegToStr(94.345));
    


    FileNameGetExt(filename$)

    Returns file extension portion of path qualified filename

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FileNameGetExt()
    


    FileNameGetName(filename$)

    Returns filename portion of path qualified filename

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FileNameGetName()
    


    FileNameGetPath(filename$)

    Returns path portion of path qualified filename

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FileNameGetPath()
    


    GetToken(string$, delimiters$, tokenNumber, compress)

    Get the nth token from a string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 25-Sep-1998
    Modify Date: 05-Jun-2001
    Available in SML for Windows: Yes

    Example:

           # Example of GetToken()
           clear();
     
           str$ = "a  b c,d";
           delimit$ = " ,";
     
           n = NumberTokens(str$, delimit$);
     
           for i = 1 to n {
              token$ = GetToken(str$, delimit$, i);
              print(i, token$);
              }
    


    left$(str$, length)

    Return leftmost n characters of string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Enter a sentence.") ; a$=input$()
         print("Enter # of chars to get.")) ; n=input()
         print(left$(a$, n))
    


    mid$(str$, start, length)

    Return n characters of string$ starting at m

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Enter a sentence.") ; a$=input$()
         print("Enter start position.")) ; m=input()
         print("Enter # of chars to get.")) ; n=input()
         print(mid$, m, n))
    


    NumberTokens(string$, delimiters$)

    Returns number of tokens in a string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 25-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NumberTokens()
           clear();
     
           str$ = "a  b c,d";
           delimit$ = " ,";
     
           n = NumberTokens(str$, delimit$);
     
           for i = 1 to n {
              token$ = GetToken(str$, delimit$, i);
              print(i, token$);
              }
    


    NumToStr(num)

    Convert a number to a string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of NumToStr()
    


    right$(str$, length)

    Return right-most n characters of string$

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         a$="Reenter this sentence."
         print(a$) ; b$=input$()
         print("Enter n.")
         n=input()
         print(right$(a$, n))
         print(right$(b$, n))
    


    sprintf(format$, value, ...)

    Assign formatted text to a string variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         format$="%s%d%s\n%s"
         str1$="This is line " ; str2$="you see."
         str3$="This is line 2" ; number=1
         s4$=sprintf(format$, str1$, 1, str2$, str3$)
         print(s4$)
    


    strlen(str$)

    Returns number of characters in string variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          clear()
          print("Enter a string. ") ; a$=input$()
          print(strlen(a$))
    


    StrToNum(str$)

    Return numerical value of string with number in it

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Enter a string. ") ; a$=input$()
         b=StrToNum(a$) ; print(b/10)
    


    tolower$(string$)

    Convert string to lower case

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of tolower$()
    


    toupper$(string$)

    Convert string to upper case

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of toupper$()
    


    Database functions (32)


    DatabaseGetTableInfo(database, name)

    Get database table information

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-May-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DatabaseGetTableInfo()
    


    FieldGetInfoByName(table, name$)

    Returns a field class.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of FieldGetInfoByName()
    


    FieldGetInfoByNumber(table, number)

    

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of FieldGetInfoByNumber()
    


    NumRecords(table)

    Returns number of records in database table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(V)
         # assume you know the table name, here we used the
         # Crow Butte Soils Vector object.  Note that 'YIELD'
         # is the correct field name,not 'yield'.
         n=NumRecords(V.poly.YIELD)
         print("Record count:", n)
    


    OpenCADDatabase(CADVar)

    Open the database subobject of a CAD object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jun-2000
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

     XXX
    


    OpenDatabase(filename$, objectname$)

    Open a main level database

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of OpenDatabase()
    


    OpenRasterDatabase(Rast)

    Returns a database class for functions that need one.

    Where:

    Parameters:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of OpenRasterDatabase()
    


    OpenTINDatabase(TINVar)

    Open the database subobject of a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jun-2000
    Modify Date: none
    Available in SML for Windows: Yes


    OpenVectorLineDatabase(Vect)

    Returns a database class for functions that need one.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of OpenVectorLineDatabase()
    


    OpenVectorPointDatabase(Vect)

    Open a Vector point database

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of OpenVectorPointDatabase()
    


    OpenVectorPolyDatabase(Vect)

    Returns a database class for functions that need one.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of OpenVectorPolyDatabase()
    


    RecordDelete(table, recordnum1, recordnum2, ...)

    Delete one or more records.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RecordDelete()
    


    TableAddField(table, field)

    Append a field to a table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 08-Jun-2001
    Modify Date: none
    Available in SML for Windows: Yes


    TableAddFieldFloat(table, name$, dispwidth, places)

    Add a new field of type float but inserts it before field "before".

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableAddFieldFloat()
    


    TableAddFieldInteger(table, name$, dispwidth)

    Add a new field of type integer but inserts it before field "before".

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableAddFieldInteger()
    


    TableAddFieldString(table, name$, maxlength, dispwidth)

    Add a new field of type string.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableAddFieldString()
    


    TableCopyToDBASE(table, filename$)

    Copy a database table to a DBASE file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableCopyToDBASE()
    


    TableCreate(database, name$, description$)

    Creates an empty table. Use TableAddField???() functions to add fields to it.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableCreate()
    


    TableExists(database, name)

    returns 1 if table exists, -1 if table doesn't exist

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 27-Nov-2000
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

     XXX
    


    TableGetInfo(Table)

    Returns a table class.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

     # Example of TableGetInfo()
     # (Assume Vect is a vector object)
     
     class DBTABLEINFO table;
     table = TableGetInvo(Vect.poly.YIELD);
     
     # Another example:
     tablename$ = "YIELD";
     table = TableGetInfo(Vect.poly.(tablename$));
     
    


    TableInsertFieldFloat(table, name$, before, dispwidth, places)

    Add a new field of type float but inserts it before field "before".

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableInsertFieldFloat()
    


    TableInsertFieldInteger(table, name$, before, dispwidth)

    Add a new field of type integer but inserts it before field "before".

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableInsertFieldInteger()
    


    TableInsertFieldString(table, name$, before, maxlength, dispwidth)

    Add a new field of type string but inserts it before field "before".

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableInsertFieldString()
    


    TableKeyFieldLookup(table, fieldName$, fieldValue1)

    Find the first record in a table that matches a given key

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableKeyFieldLookup()
    


    TableLinkDBASE(database, filename$, name$, description$)

    Makes a link to a dBase file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of TableLinkDBASE()
    


    TableNewRecord(table, fieldValue1, fieldValue2, ...)

    Add new record to a database

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-May-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableNewRecord()
    


    TableOpen(database, tablename$)

    Open a database table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-May-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableOpen()
    


    TableReadAttachment(table, element_number, records, element_type$)

    Returns records that are attached to or related to a given element in a object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 14-Nov-2000
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

     XXX
    


    TableReadFieldNum(table, fieldName$, recordNum)

    Read a number from a table (using DBTABLEINFO)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableReadFieldNum()
    


    TableReadFieldStr(table, fieldName$, recordNum)

    Read a string from a table (using DBTABLEINFO)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableReadFieldStr()
    


    TableWriteAttachment(table, element_number, records, num_records, element_type$)

    Attaches records in a table to an element in a object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 14-Nov-2000
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

     # Example:
     # Have the user select a vector object.
     # attach records 5 and 7 to polygon number 12.
     
     VECTOR Vect;
     class DBTABLEINFO table;
     array records[2];
     
     GetInputVector(Vect);
     table = TableGetInfo(Vect.poly.YIELD);
     records[1] = 5;
     records[2] = 7;
     TableWriteAttachment(table, 12, records, 2, "polygon");
     
    


    TableWriteRecord(table, recordNum, fieldValue1, fieldValue2, ...)

    Write values to an existing database record

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 15-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TableWriteRecord()
    


    Raster functions (46)


    AreaCorrelatePoint(RasterSource, xSource, ySource, RasterDestination, xDestination, yDestination, sourceSize, targetSize)

    Adjust point position of Raster to match known position in refererence Raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of AreaCorrAdjustPoint()
           clear();
           GetInputRaster(Rs);
           GetInputRaster(Rd);
           xS = 55;
           yS = 60;
           xD = 50;
           yD = 63;
           sourceSize = 21;
           targetSize = 50;
           cor = AreaCorrelatePoint(Rs, xS, yS, Rd, xD, yD, sourceSize, targetSize);
           print(xS, yS, xD, yD, cor);
    


    Binarization(Raster, filename$, objname$, array, binaryValue)

    Calculates a raster binarization on an 8 or 4 bit raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 15-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         clear();
         array myarray[15];
         for x=1 to 15{
         	myarray[x]=80+x;
         }
         OpenRaster(Rvar, "c:/tnt/testdata.rvc", "GREEN");
         Binarization(Rvar, "c:/tnt/testdata.rvc", "binaryout", myarray, 1);
         OpenRaster(Rout, "c:/tnt/testdata.rvc", "binaryout");
        handle=DispOpen(750,550);
        DispQuickAddRasterVar(handle, Rout);
        DispRedraw(handle);
        CloseRaster(Rvar);
        CloseRaster(Rout);
    


    CloseRaster(Raster)

    Close an open raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         OpenRaster(Rvar)
         Rvar[1, 1] = 42 ; print(Rvar[1, 1])
         CloseRaster(Rvar)
    


    ColScale(Raster)

    Get horizontal size of raster cell

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(A)
         print(ColScale(A))
    


    ComputeRasterProperties(Raster, Vector, tableName$, tableDescription$, flag1$, flag2$, ...)

    Compute Raster attribute tables from a Vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Aug-1998
    Modify Date: 08-Jul-1999
    Available in SML for Windows: Yes

    Example:

           # Example of ComputeRasterProperties()
          OpenRaster(R, "c:/tnt/win32/CB_tm.rvc", "BLUE");
          OpenRaster(R1, "c:/tnt/win32/CB_tm.rvc", "RED");
          OpenRaster(R2, "c:/tnt/win32/CB_tm.rvc", "GREEN");
          OpenVector(V, "c:/tnt/win32/vector.rvc", "VectorObject");
          ComputeRasterProperties(R, V, "TableName", "Description", "IncludeAll", "ComputeHistogram", R1, R2);
    


    ComputeSlopeAspectShading(inputRVCFile$, inputRaster$, outputRVCFile$, rescaleSlope, numberSlopeCells$, slopeTypeDegrees$, rescaleAspect, horizontalScale, verticalScale, elevationScale, sunElevationAngle, sunDirection, slopeObjectName$, slopeDescription$, slopeDataType$, aspectObjectName$, aspectDescription$, aspectDataType$, shadingObjectName$, shadingDescription$, shadingDataType$)

    Compute slope/aspect/shading from elevation Raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-Dec-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ComputeSlopeAspectShading()
          inputFile$ = "c:/cb_tm.rvc";
          inputRaster$ = "ELEVATION";
          outputFile$ = "c:/SAS.rvc";
          rescaleSlope = 1;
          numberSlopeCells$ = "4 neighbor";
          slopeTypeDegrees$ = "Degrees";
          rescaleAspect = 1;
          horizontalScale = 30.0;
          verticalScale = 30.0;
          elevationScale = 1.0;
          sunElevationAngle = 50.0;
          sunDirection = 45.0;
          ComputeSlopeAspectShading(inputFile$, inputRaster$, outputFile$,
                rescaleSlope, numberSlopeCells$, slopeTypeDegrees$,
                rescaleAspect, horizontalScale, verticalScale,
                elevationScale, sunElevationAngle, sunDirection);
    


    ConvertCompToComp(InputRaster, fileName$, objName$, colorDepth)

    Converts the color depth of a raster to another color depth.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Aug-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ConvertCompToComp
           clear();
           OpenRaster(Rvar, "c:/tnt/samp.rvc", "COMP24");
           ConvertCompToComp(Rvar, "c:/tnt/samp.rvc", "conv8", 8);
     
           OpenRaster(Ovar, "c:/tnt/samp.rvc", "conv8");
           handle=DispOpen(750,550);
           DispQuickAddRasterVar(handle, Ovar);
           DispRedraw(handle);
     
           CloseRaster(Rvar);
           CloseRaster(Ovar);
    


    ConvertRGBToComposite(RedRaster, GreenRaster, BlueRaster, fileName$, objName$, numColors, bitDepth, samplingRate)

    Converts and RGB raster to an 8 or 4 bit composite

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         clear();
         OpenRaster(Rvar, "c:/tnt/samp.rvc", "RED");
         OpenRaster(Gvar, "c:/tnt/samp.rvc", "GREEN");
         OpenRaster(Bvar, "c:/tnt/samp.rvc", "BLUE");
     
         ConvertRGBToComposite(Rvar, Gvar, Bvar, "c:/tnt/samp.rvc", "composite", 16, 8, 2);
     
         OpenRaster(Ovar, "c:/tnt/samp.rvc", "composite");
         handle=DispOpen(750,550);
         DispQuickAddRasterVar(handle, Ovar);
         DispRedraw(handle);
     
         CloseRaster(Rvar);
         CloseRaster(Gvar);
         CloseRaster(Bvar);
         CloseRaster(Ovar);
    


    CreateHistogram(Raster)

    Create a histogram for a Raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(R)
         CreateHistogram(R)
         CloseRaster(R)
    


    CreatePyramid(Raster, average)

    Create a pyramid version of Rvar and store it as Rvar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         CreatePyramid(R)
         CloseRaster(R)
    


    CreateRaster(Raster, filename$, objname$, desc$, lins, cols, datatype$)

    Create a new raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         file$="c:/temp.rvc"
         obj$="TempRast" ; description$="temporary raster for test"
         lin = 1024 ; col = 512 ; type$="8-bit unsigned"
         CreateRaster(Rvar, file$, obj$, description$, lin, col, type$)
         print(NumLins(Rvar), NumCols(Rvar))
         # do some things to Rvar
         CloseRaster(Rvar)
    


    CreateRasterBinaryMask(Raster, filename$, objname$, maskValue)

    Crete a binary mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CreateRasterBinaryMask()
    


    CreateRasterFromObject(Object, Raster, filename$, objname$, description$, horizontalScale, verticalScale, datatype$, georef)

    Create a Raster to match a given Object.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Apr-1998
    Modify Date: 29-Apr-1998
    Available in SML for Windows: Yes

    Example:

        # example of CreateRasterFromObject()
        GetInputVector(V);
        georef = GetLastUsedGeorefObject(V);
        CreateBlankRasterFromObject(V, R, "c:/tnt/win32/projects/vtor/RasOut.rvc",
              "VtoR", "Raster from Vector", 30, 30, "8-bit unsigned", georef);
        R = 0 # zero out the Raster
        CloseRaster(R);
        CloseVector(V);
        print("done");
    


    CreateRasterMask(Raster, filename$, objname$, maskValue)

    Crete a mask raster (for use as a transparancy mask)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CreateRasterMask()
    


    CreateTempRaster(Raster, lins, cols, datatype$, noDeleteOnClose)

    Create a raster in RAM

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         lin = 1024 ; col = 512 ; type$="8-bit unsigned"
         CreateTempRaster(Rvar, lin, col, type$)
         print(NumLins(Rvar), NumCols(Rvar))
         # do some things to Rvar
         CloseRaster(Rvar)
    


    DeleteContrast(Raster)

    Delete contrast subobjects of raster Rvar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         DeleteContrast(Rvar)
    


    DeleteHistogram(Raster)

    Delete histogram subobject of raster Rvar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         DeleteHistogram(Rvar)
    


    DeletePyramid(Raster)

    Delete pyramid subobject of raster Rvar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         DeletePyramid(Rvar)
    


    DeleteTempRaster(Raster)

    Delete a raster that has been created with CreateTempRaster()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         lin = 1024 ; col = 512 ; type$ = "8-bit unsigned"
         CreateTempRaster(A, lin, col, type$)
         # do something with A
         DeleteTempRaster(A)
    


    GetInputRaster(Raster, lins, cols, datatype$)

    Use a File/Object selection dialog to select an input Raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         lines=488 ; columns=361   # Crow Butte TM raster dimensions
         type$="8-bit unsigned"
         # allow only specific raster size and type
         GetInputRaster(R, lines, columns, type$) ; CloseRaster(R)
         # allow any size, but only a specific type
         GetInputRaster(R, 0, 0, type$) ; CloseRaster(R)
    


    GetInputRasters(Raster, ...)

    Get more than one raster.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetInputRasters()
    


    GetOutputRaster(Raster, lins, cols, datatype$)

    Use a File/Object selection dialog to select an output Raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(R)
         lines=NumLins(R) ; columns=NumCols(R) ; type$=RastType(R)
         # allow selection or creation of a raster identical
         # in size and type to R.
         GetOutputRaster(R2, lines, columns, type$)
         CloseRaster(R) ; CloseRaster(R2)
    


    HasNull(Raster)

    Does a raster object have an assigned NULL value?

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         if (HasNull(R) then
            print("R has a NULL value.") else
               print("R does not have a NULL value.")
         # The last line is always executed - it's not in the loop.
         CloseRaster(R)
    


    IgnoreNull(Raster)

    Do not report NULLs in raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         if (HasNull(R)) then begin
            print("R has a NULL value.")
            print("\nIt is now ignored.")
            IgnoreNull(R) end else begin
               print("R has no NULL value.")
               print("That's all, folks.")
               end
         # The last line is always executed - it's not in the loop.
         CloseRaster(R)
    


    LinScale(Raster)

    Vertical size of raster cell

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         a=LinScale(R) ; print("Line scale is:", a)
         CloseRaster(R)
    


    MultiRegression(resultMat, Raster1, Raster2, ...)

    Computes coefficients of multilinear regression equations on a set of rasters

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear() # clear the console
         h1 = CreateMatrix(3, 4) # holds the results
         # get three input rasters to do multiregression on
         GetInputRaster(Rr)   # get red input raster
         GetInputRaster(Rg)   # get green input raster
         GetInputRaster(Rb)   # get blue input raster
         # do the multi-regression - result in h1
         MultiRegression(h1, Rr, Rg, Rb)
         print("Multi-Regression Output")
         for r = 0 to 2 {
            for c = 0 to 3 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         CloseRaster(Rr) # do clean up
         CloseRaster(Rg)
         CloseRaster(Rb)
         DestroyMatrix(h1)
    


    NullValue(Raster)

    Value (if any) assigned as NULL for a raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         n=NullValue(R) ; print("Null value is",n)
         CloseRaster(R)
    


    NumCols(Raster)

    Number of columns in a raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         columns=NumCols(R)
         print("Number of columns:", columns)
         CloseRaster(R)
    


    NumLins(Raster)

    Number of lines (rows) in a raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         lines=NumLins(R)
         print("Number of lines:", lines)
         CloseRaster(R)
    


    OpenRaster(Raster, filename$, objname$)

    Open an existing raster file, putting it in Raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         OpenRaster(R, "c:/data/cb_tm.rvc", "blue")
         #  or OpenRaster(R, "c:\\data\\cb_tm.rvc", "blue")
         print("Line count: ", NumLines(R))
    


    OpenRasterObject(Raster, object)

    Open a raster given object from SelectInputObject()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 18-Nov-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of OpenRasterObject()
    


    PrincipleComponents(forwardMat, inverseMat, Raster1, Raster2, ...)

    Computes principal component transformation matrix for a set of rasters

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear() # clear the console
         # create the transformation matrices
         # to send to principal companent function
         forwardMat = CreateMatrix(3, 3)
         inverseMat = CreateMatrix(3, 3)
         # outMat = (forward * inMat)
         inMat = CreateMatrix(3, 1)
         # use to calculate the transformation
         outMat = CreateMatrix(3, 1)
         # get three input rasters to do principal components on
         # get red input raster
         GetInputRaster(Rr)
         GetInputRaster(Rg)   # get green input raster
         GetInputRaster(Rb)   # get blue input raster
         # create the rasters to hold principal components
         # output values will contain negative numbers so
         # allways use signed type
         GetOutputRaster(R1, NumLins(Rr), NumCols(Rr), "64-bit float")
         GetOutputRaster(R2, NumLins(Rr), NumCols(Rr), "64-bit float")
         GetOutputRaster(R3, NumLins(Rr), NumCols(Rr), "64-bit float")
         # get the tranformation matrices
         PrincipleComponents(forwardMat, inverseMat, Rr, Rg, Rb)
         # print the forward matrix
         print("Forward matrix")
         for r = 0 to 2 {
            for c = 0 to 2 {
               a = GetMatrixItem(forwardMat, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # print the inverse matrix
         print("Inverse matrix")
         for r = 0 to 2 {
            for c = 0 to 2 {
               a = GetMatrixItem(inverseMat, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # now compute the principal component values
         # for each point in raster
         numColumns = NumCols(Rr)
         numLines = NumLins(Rr)
         for r = 1 to NumLins(Rr) {
            for c = 1 to NumCols(Rr) {
               SetMatrixItem(inMat, 0, 0, Rr[r,c])
               SetMatrixItem(inMat, 1, 0, Rg[r,c])
               SetMatrixItem(inMat, 2, 0, Rb[r,c])
               MultiplyMatrix(outMat, forward, inMat)
               R1[r,c] = GetMatrixItem(outMat, 0, 0)
               R2[r,c] = GetMatrixItem(outMat, 1, 0)
               R3[r,c] = GetMatrixItem(outMat, 2, 0)
               }
            }
         # do clean up
         CloseRaster(Rr)
         CloseRaster(Rg)
         CloseRaster(Rb)
         CloseRaster(R1)
         CloseRaster(R2)
         CloseRaster(R3)
         DestroyMatrix(forwardMat)
         DestroyMatrix(inverseMat)
         DestroyMatrix(inMat)
         DestroyMatrix(outMat)
    


    PrincipleComponentsExt(forward, inverse, stats, Raster1, Raster2, ...)

    Compute principle components and statistics

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Dec-2000
    Modify Date: none
    Available in SML for Windows: Yes


    RasterApplyContrast(InputRaster, fileName$, objName$, flag$)

    Applies a contrast table to a raster. This function is obsolete. Use RasterApplyContrast2() instead.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Aug-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of RasterApplyContrast
           clear();
           OpenRaster(Rvar, "c:/tnt/samp.rvc", "RED");
     
           RasterApplyContrast(Rvar, "c:/tnt/samp.rvc", "contsamp", "equalize");
           OpenRaster(Ovar, "c:/tnt/samp.rvc", "contsamp");
     
           handle=DispOpen(750,550);
           DispQuickAddRasterVar(handle, Ovar);
           DispRedraw(handle);
     
           CloseRaster(Rvar);
           CloseRaster(Ovar);
    


    RasterApplyContrast2(InputRaster, OutputRaster, type$, subobjectName$)

    Applies a contrast table to a raster.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Oct-2001
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of RasterApplyContrast2
     
           GetInputRaster(Rvar);
           GetOutputRaster(OutRast, NumLins(Rvar), NumCols(Rvar), "8-bit unsigned");
           RasterApplyContrast2(Rvar, OutRast, "Subobject");
    


    RasterExists(filename$, objectname$)

    Determine if a Raster exists. Made obsolete by ObjectExists()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of RasterExists()
    


    RasterLinearCombination(transformMat, outRVCFilename$, rasterNamePrefix$, rasterDescPrefix$, flags, InRas1, InRas2, ...)

    Creates Rasters that are linear combinations of input Rasters

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # creating and filling in the transform matrix
         #
         # the matrix size is determined by the number
         # of input and output rasters:
         # number of columns = number of input rasters + 1
         # number of rows = number of output rasters
         # column 1 hold offset coefficients
         # columns 2 to (N + 1) hold the coeffients for the N
         # output rasters
         # in general if:
         # N = number of output rasters, M = number of input rasters
         #
         # OutRasterN[r,c] =  transformMatrix[N-1,0]
         #                    + transformMatrix[N-1,1] *
         #                    InRaster1[r,c]
         #                    + transformMatrix[N-1,2] *
         #                    InRaster2[r,c]
         #                    + ...
         #                    + transformMatrix[N-1,M] *
         #                    InRasterM[r,c]
         #
         # our matrix will be:
         # | 0.0  .213  .715  .072 |  - coeff. for the first raster
         # | 0.0  .333  .333  .333 |  - coeff. for the second raster
         #
         # our output rasters are created using these formulas:
         #
         # Lcombo1[r,c] = 0.0 + (.213 * Rred[r,c])
         #                + (.715 * Rgreen[r,c])
         #                + (.072 + Rblue[r,c])
         #
         # Lcombo2[r,c] = 0.0 + (.333 * Rred[r,c])
         #                + (.333 * Rgreen[r,c])
         #                + (.333 + Rblue[r,c])
         #
         # Compute brightness Raster from rgb rasters
         # the coefficents are only approximate, correct for NTSC(1953)
         # set up variables to hold values for flags
         flagNoAutoscale = 0
         flagAutoscale = 1
         outRVCFile$ = "c:/tnt/win32/Tntdata/cb_data/cb_tm.rvc"
         # get the input rasters
         OpenRaster(Rred, outRVCFile$, "RED")
         OpenRaster(Rgreen, outRVCFile$, "GREEN")
         OpenRaster(Rblue, outRVCFile$, "BLUE")
         numInputRasters = 3
         numOutputRasters = 2
         transform = CreateMatrix(numOutputRasters, numInputRasters)
         # output Raster one
         # set matrix items (coefficients) equal to correct
         # red, green, and blue contributions to brightness
         SetMatrixItem(transform, 0, 0, 0.0)  # sets offset to zero
         SetMatrixItem(transform, 0, 1, .212) # red
         SetMatrixItem(transform, 0, 2, .715) # green
         SetMatrixItem(transform, 0, 3, .072) # blue
         # output Raster two
         # other method to compute brightness - not as good
         # set coefficients for average of red, green, and blue
         # sets offset to zero
         SetMatrixItem(transform, 1, 0, 0.0)
         SetMatrixItem(transform, 1, 1, .333) # red
         SetMatrixItem(transform, 1, 2, .333) # green
         SetMatrixItem(transform, 1, 3, .333) # blue
         flags = 0 # no auto scale
         RasterLinearCombination(transform, outRVCFile$,
            "Lcombo", "Linear Combinations Test :", flags,
             Rred, Rgreen, Rblue)
         DestroyMatrix(transform)
         CloseRaster(Rred)
         CloseRaster(Rgreen)
         CloseRaster(Rblue)
    


    RasterToBinaryViewshed(InRaster, OutRaster, nPoints, xMatrix, yMatrix, percent, height, zScale, maxdistance, horizstart, horizend, vertstart, vertend, earth_curv, invert_transp)

    Computes viewshed from elevation Raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # computes viewshed for all points on all lines
         # of a corresponding Vector object
         # could use to get viewshed for all points
         # on one or more roads
     
         array xArray[10], yArray[10] # use to hold line points
         clear() # clear the console
         # get the input and output raster and Vector object
         GetInputRaster(Rin)
         GetInputVector(V)
         GetOutputRaster(Rout)
         # get georef object id's for raster and vector
         georefR = GetLastUsedGeorefObject(Rin)
         georefV = GetLastUsedGeorefObject(V)
         # first count total number of points in all lines
         numLines = NumVectorLines(V)
         numberPoints = 0
         for thisLine = 1 to numLines {
            numPointsInThisLine = GetVectorLinePointList(V,
                                  xArray, yArray, thisLine)
            numberPoints += numPointsInThisLine
            }
         # now create matrices large enough to hold points
         matX = CreateMatrix(1, numberPoints)
         matY = CreateMatrix(1, numberPoints)
         # now loop through lines and fill in matrices with points
         currentPoint = 0 # this will be our matrix index
         for thisLine = 1 to numLines {
            numPointsInThisLine = GetVectorLinePointList(V,
                                  xArray, yArray, thisLine)
            for i = 1 to numPointsInThisLine {
               # convert vector coordinates to georef
               ObjectToMap(V, xArray[i], yArray[i], georefV,
                           xVector, yVector)
               # convert vector coordinates to raster
               # coordinates
               # note the order of rCol and rLine
               # col = x coord, row = y coord
               MapToObject(georefR, xVector, yVector, Rin, rCol, rLine)
               # force to upper left corner
               rLine = floor(rLine)
               rCol = floor(rCol)
               # want matrix to index from zero to numberPoints
               SetMatrixItem(matX, 0, currentPoint, rCol)
               SetMatrixItem(matY, 0, currentPoint, rLine)
               currentPoint += 1
               } # end of for I
            } # end of for each line in V
            # set default values - want any one view point to make
            # "visible"
            percent = 100 / numberPoints
            height = 0
            zScale = 1
            # now create the viewshed Raster object
            RasterToBinaryViewshed(Rin, Rout, numberPoints,
                          matX, matY, percent, height, zScale)
            # clean up
            GeorefFree(georefR) # must free up id's
            GeorefFree(georefV)
            DestroyMatrix(matX)
            DestroyMatrix(matY)
            CloseRaster(Rin)
            CloseRaster(Rout)
    


    RastType(Raster)

    Returns data type code of a raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         print(RastType(R))
         CloseRaster(R)
    


    ReadHistogram(Raster, histo)

    Read raster's histogram into array

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R, 0, 0, "8-bit unsigned")
         array histo[256]
         ReadHistogram(R, histo)
         for i=0 to 255
            print(i, histo[i])
         CloseRaster(R)
    


    ResampleRasterToCellSize(InRast, OutRast, linscale, colscale, model$, method$)

    Copies, transforms and resamples cells to new raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         linscale = 30   # meters
         colscale = 30   # meters
         ResampleRasterToCellSize(Rin, Rout, linscale, colscale, \
                                  "affine", "cubic"$)
    


    ResampleRasterToMatch(InRast, RefRast, OutRast, model$, method$)

    Create a new raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(Rin);
         GetInputRaster(Rref);
         lin=NumLins(Rref);
         col=NumCols(Rref);
         type$=RastType(Rref);
         printf("Enter new null value: ");
         newNull=input(255);
         GetOutputRaster(Rout, lin, col, type$);
         SetNull(Rout, newNull);
         model$="affine";
         method$="nearest neighbor";
         ResampleRasterToMatch(Rin, Rref, Rout, model$, method$);
         CloseRaster(Rin);
         CloseRaster(Rref);
         CloseRaster(Rout);
    


    SelectInputObject(type$, prompt$, filename$, objname$)

    Popup dialog to select an object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 18-Nov-1998
    Modify Date: 17-May-2000
    Available in SML for Windows: Yes

    Example:

           # Example of SelectInputObject()
    


    SetNull(Raster, nullvalue)

    Assign NULL value of Raster to be x

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R, 0, 0, "8-bit unsigned")
         x=PopupNum("Enter integer.", 0, 0, 255, 0)
         SetNull(R, x)
         CloseRaster(R)
    


    SetScale(Raster, linscale, colscale)

    Assign vertical and horizontal cell size

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R, 0, 0, "8-bit unsigned")
         h=PopupNum("Enter h scale.", 0, 0, 255, 0)
         v=PopupNum("Enter v scale.", 0, 0, 255, 0)
         SetScale(R, h, v)
         CloseRaster(R)
    


    UseNull(Raster)

    Recognize and use assigned NULL value of raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         if (PopupYesNo("UseNull?", 1)) then
            UseNull(R)
         CloseRaster(R)
    


    Vector functions (33)


    CloseVector(Vector)

    Close a Vector object.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of CloseVector()
          GetInputVector(V);
          # do something with V
          CloseVector(V);
    


    CreateTempVector(Vector, flag1$, flag2$)

    Create a temporary Vector object.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Apr-1998
    Modify Date: 19-May-1998
    Available in SML for Windows: Yes

    Example:

         # Example of CreateTempVector()
          CreateTempVector(VTemp)
          # do something with it
          CloseVector(VTemp)
    


    CreateVector(Vector, filename$, objname$, desc$, flag1$, flag2$)

    Create a Vector without using a dialog using same flags as GetOutputVector().

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-May-1998
    Modify Date: 19-May-1998
    Available in SML for Windows: Yes

    Example:

         # Example of CreateVector()
          CreateVector(Vpoly,    "c:/tnt/win32/createV.rvc", "Vpoly",    "Polygonal",  "Polygonal")
          CreateVector(Vplanar,  "c:/tnt/win32/createV.rvc", "Vplanar",  "Planar",     "Planar")
          CreateVector(Vnetwork, "c:/tnt/win32/createV.rvc", "Vnetwork", "Network",    "Network")
          CreateVector(Vnotopo,  "c:/tnt/win32/createV.rvc", "Vnotopo",  "NoTopology", "NoTopology")
    


    FindClosestLabel(Vector, x, y, georef, maxdist, distance)

    Find closest Vector label.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-Jun-1981
    Modify Date: 24-Jun-1999
    Available in SML for Windows: Yes

    Example:

          # example of FindClosestLabel()
          GetOutputVector(VIn, 1)
          georef = GetGeorefObject(VIn)
          numberLabels = NumVectorLabels(VIn)
          label = FindClosestLabel(VIn, 150000, 335000, georef, 1000000)
          VectorDeleteLabel(Vin, label)
          print("number, closest", numberLabels, label)
    


    FindClosestLine(Vector, x, y, georef, maxdist, distance)

    Return line element closest to x,y coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: 24-Jun-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         GetInputVector(Vvar)
         georef = GetGeorefObject(Vvar)
         print("Enter x.") ; x = input()
         print("Enter y.") ; y = input()
         print("Enter maxDistance.") ; maxDistance = input()
         num = FindClosestLine(Vvar, x, y, georef, maxDistance)
         print(num)
    


    FindClosestNode(Vector, x, y, georef, maxdist, distance)

    Return node element closest to x,y coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: 24-Jun-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         GetInputVector(Vvar)
         georef = GetGeorefObject(Vvar)
         print("Enter x.") ; x = input()
         print("Enter y.") ; y = input()
         print("Enter maxDistance.") ; maxDistance = input()
         num=FindClosestNode(Vvar, x, y, georef, maxDistance)
         print(num)
    


    FindClosestPoint(Vector, x, y, georef, maxdist, distance)

    Return point element closest to x,y coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: 24-Jun-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         GetInputVector(Vvar)
         georef = GetGeorefObject(Vvar)
         print("Enter x.") ; x = input()
         print("Enter y.") ; y = input()
         print("Enter maxDistance.") ; maxDistance = input()
         num = FindClosestPoint(Vvar, x, y, georef, maxDistance)
         print(num)
    


    FindClosestPoly(Vector, x, y, georef, maxdist, distance)

    Return polygon element closest to x,y coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: 24-Jun-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         GetInputVector(Vvar)
         georef = GetGeorefObject(Vvar)
         print("Enter x.") ; x = input()
         print("Enter y.") ; y = input()
         print("Enter maxDistance.") ; maxDistance = input()
         num=FindClosestPoly(Vvar, x, y, georef, maxDistance)
         print(num)
    


    GetInputVector(Vector)

    Use a File/Object selection dialog to select an input Vector

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputVector(Vvar)
         # do something with it
    


    GetInputVectorList(VectorList, prompt$)

    Get multiple Vector objects.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetInputVectorList()
    


    GetOutputVector(Vector, flag1$, flag2$)

    Open a vector object for use with vector toolkit funtions

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10]
         clear()
         # for multiple flags simply comma seperate them as below
         GetOutputVector(V, "VectorToolkit", "NoQtree,NoDBStatTable")
         # draw some boxes  - this will create polygons
         # all closed lines are converted to polygons
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         xPoints[5] = 0
         yPoints[5] = 0
         VectorAddLine(V, 5, xPoints, yPoints)
         # now add some points
         for i = 1 to 4 {
            VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150)
            }
         numPolys = NumVectorPolys(V)
         numberPoints = NumVectorPoints(V)
         print("number of polygons, points: ", numPolys, numberPoints)
    


    GetVectorLinePointList(Vector, xarray, yarray, line, zarray)

    Returns (via arrays xArray and yArray, and optional zArray) a list of points in a line.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xArray[10], yArray[10], zArray[10]   # will be resized automatically
         GetInputVector(Vvar)
         numLines = NumVectorLines(Vvar)
         nPoints = GetVectorLinePointList(Vvar, xArray, yArray, 1, zArray)
         for i = 1 to nPoints {
            print(xArray[i], yArray[i], zArray[i])
            }
    


    GetVectorNodeLineList(Vector, lines, node)

    Returns (via array linesArray) a list of lines attached to node.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         array linelist[10]   # will be resized automatically
         GetVectorNodeLineList(Vvar, linelist, 1)
    


    GetVectorPolyAdjacentPolyList(Vector, polygonList, polygonNumber)

    Returns list of all polygons that share a common line with a given polygon in a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # reads the poly list of all adjacent polygons to a given polygon
         # it only returns polygons that have common lines !!!
         # not a single common node
         array polygonList[10] # array to hold poly list
         clear()
         GetInputVector(V)
         polygonNumber = 150 # polygonNumber = 150 works for cb_soils/CBSOILS_Lite
         numadjacent = GetVectorPolyAdjacentPolyList(V, polygonList, polygonNumber)
         temp$ = "number of polygons adjacent to polygon:"
         print(temp$, polygonNumber, " = ", numadjacent)
         for i = 1 to numadjacent {
            print(i, ":", polygonList[i])
            }
         print("Done")
    


    GetVectorPolyIslandList(Vector, islands, polygon)

    Returns (via array islandsArray) a list of islands of a polygon.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         array islandlist[10]   # will be resized automatically
         GetVectorPolyIslandList(Vvar, islandlist, 1)
    


    GetVectorPolyLineList(Vector, lines, polygon)

    Returns (via array linesArray) a list of lines forming a polygon

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         array linelist[10]   # will be resized automatically
         GetVectorPolyLineList(Vvar, linelist, 1)
    


    NumVectorLabels(Vector)

    Returns number of labels in a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(Vin)
         numLabels = NumVectorLabels(Vin)
         print("number of labels: ", numLabels)
    


    NumVectorLines(Vector)

    Returns number of lines in vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(V)
         n=NumVectorLines(V)
         print("Line count: ", n)
    


    NumVectorNodes(Vector)

    Returns number of nodes in vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(V)
         n=NumVectorNodes(V)
         print("Node count: ", n)
    


    NumVectorPoints(Vector)

    Returns number of points in vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(V)
         n=NumVectorPoints(V)
         print("Point count: ", n)
    


    NumVectorPolys(Vector)

    Returns number of polygons in vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(V)
         n=NumVectorPolys(V)
         print("Polygon count: ", n)
    


    OpenInputVectorList(VectorList, filename1$, objname1$, filename2$, objname2$, ...)

    Open multiple Vector objects

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-May-1998
    Modify Date: 19-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of OpenInputVectorList()
    


    OpenVector(Vector, filename$, objname$, flag1$, flag2$)

    Open a Vector without using a dialog using same flags as GetOutputVector().

    Where:

    Parameters:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of OpenVector()
          fileName$ = "c:/tnt/win32/vcBound/bound/Create.rvc"
          objectName$ = "VCreate"
          OpenVector(VOut, fileName$, objectName$, "VectorToolkit")
    


    VectMerge(Obj1, Obj2, ...)

    Merge two or more Vector objects

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of VectMerge()
    


    VectorAND(OperatorVector, SourceVector, flags$)

    Returns Vector that is the logical result of two input vectors

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         See example for VectorOR()
    


    VectorElementInRegion(Rgnvar, Vectvar, element, flag1$, flag2$)

    Tests a Vector element against a region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of VectorElementInRegion()
          clear()
          GetInputVector(VIn)
          GetInputRegion(Region1)
          elementNumber = 1
          inRegion = VectorElementInRegion(Region1, VIn, elementNumber, "line", "CompletelyInside")
          if (inRegion)
             print( "element ", elem, "is CompletelyInside\n")
    


    VectorExists(filename$, objectname$)

    Determines if vector object exists in project file. Made obsolete by ObjectExists()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         file$="d:/sf_data/haywsoil" ; ob$="hsoils"
         if (VectorExists(file$, ob$)) then
             print("Vector ", ob$, "Exists in ", file$)
    


    VectorExtract(OperatorVector, SourceVector, operation, flags$, pointQuery$, lineQuery$, polyQuery$)

    Returns Vector that is the result of the operator applied to the source

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # get the input vectors
         GetInputVector(Voperator)
         GetInputVector(Vsource)
         # get the output vector
         GetOutputVector(Vout1)
         # use default flags
         Vout1 = VectorExtract(Voperator, Vsource, "PartInside")
         GetOutputVector(Vout2)
         operation$ = "CompInside"
         flags$ = "TableRemoveDupRec,RemExRecords"
         # using optional flags (example showing two flags)
         Vout2 = VectorExtract(Voperator, Vout1, operation$, flag$)
    


    VectorOR(OperatorVector, SourceVector, flags$)

    Returns Vector that is the logical result of two input vectors

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No


    VectorReplace(OperatorVector, SourceVector, flags$)

    Returns Vector that is the logical result of two input vectors

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         See sample for VectorOR()
    


    VectorSubtract(OperatorVector, SourceVector, flags$)

    Returns Vector that is the logical result of two input vectors

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         See example for VectorOR()
    


    VectorToolkitInit(Vector, flag2$)

    Initialize an open Vector object for use with vector toolkit functions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of VectorToolkitInit()
    


    VectorXOR(OperatorVector, SourceVector, flags$)

    Returns Vector that is the logical result of two input vectors

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         See example for VectorOR()
    


    Object functions (25)


    CloseStyleObject(style)

    Close an open style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of CloseStyleObject()
    


    CopyObject(srcfilename$, srcobjectnumber, destfilename$, parentobjectnumber)

    Copy object and all of its subobjects.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         srcfile$="/data/standard/cb_tm.rvc"
         destfile$="/data/standard/temp.rvc"
         CopyObject(srcfile$, 1, destfile$, 1)
    


    CopyObjectWithoutSubobjects(srcfilename$, srcobjectnumber, destfilename$, parentobjectnumber)

    same as CopyObject() except no subobjects are copied.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         srcfile$="/data/standard/cb_tm.rvc"
         destfile$="/data/standard/temp.rvc"
         CopyObject(srcfile$, 1, destfile$, 1)
    


    CopySubobjects(SourceObject, DestObject, type$)

    Copy raster subobjects from Source to Target

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(A)
         GetOutputRaster(B, NumLins(A), NumCols(A), RastType(A))
         CopySubobjects(A, B)
         CloseRaster(A) ; CloseRaster(B)
    


    CreateProjectFile(filename$, description$)

    Create a project file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CreateProjectFile()
           CreateProjectFile("c:/ProjName.rvc", "Project file created in SML");
    


    DeleteObject(filename$, objectnumber)

    Deletes an object, (and all subobjects), by object number

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         fileName$="/data/standard/cb_tm.rvc"
         DeleteObject(fileName$, 1)
    


    DeleteSubobjects(Object, type$)

    Deletes subobjects from raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         DeleteSubobjects(Rvar, "Pyramid")
    


    GetAllObjectNumbers(filename$, array, object$, parent)

    Determines if object exists in project file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         array objnums[10];
         max = GetAllObjectNumbers("c:/tnt/benchmarks/benchmrk.sml",objnums,"Raster");
         print(max);
         for x=1 to max {
            print (objnums[x]);
         }
    


    GetObjectDescription(filename$, objectnumber)

    Gets the description of an object by object number

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         fileName$="/data/standard/cb_tm.rvc"
         GetObjectDescription(fileName$, 1)
    


    GetObjectExtents(Object, xMin, yMin, xMax, yMax, georef)

    Returns the x and y extents for a CAD, TIN, vector, or raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         # vector object
         GetInputVector(V)
         GetObjectExtents(V, xMin, yMin, xMax, yMax)
         print("vector extents xMin, yMin, xMax, yMax")
         printf("%10.2f %10.2f %10.2f %10.2f \n", xMin, yMin, xMax, yMax)
         vGeoref = GetLastUsedGeorefObject(V)
         GetObjectExtents(V, xMin, yMin, xMax, yMax, vGeoref)
         print("vector extents xMin, yMin, xMax, yMax")
         printf("%10.2f %10.2f %10.2f %10.2f \n", xMin, yMin, xMax, yMax)
    


    GetObjectExtentsRegion(Object, georef)

    Get the extents of an object as a region

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Feb-2000
    Modify Date: none
    Available in SML for Windows: Yes


    GetObjectFileName(Object)

    Returns the path qualified RVC file name for an object.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rin)
         # get the RVC file name
         str$ = GetObjectFileName(Rin)
         objNum = GetObjectNumber(Rin)
         print("Raster Object Number: ", objNum, "RVC file Name: ", str$)
         GetInputVector(Vin)
         # get the RVC file name
         str$ = GetObjectFileName(Vin)
         objNum = GetObjectNumber(Vin)
         print("Vector Object Number: ", objNum, "RVC file Name: ", str$)
         GetInputTIN(Tin)
         # get the RVC file name
         str$ = GetObjectFileName(Tin)
         objNum = GetObjectNumber(Tin)
         print("TIN Object Number: ", objNum, "RVC file Name: ", str$)
    


    GetObjectName(filename$, objectnumber)

    Gets the name of an object by object number

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         fileName$="/data/standard/cb_tm.rvc"
         GetObjectName(fileName$, 1)
    


    GetObjectNumber(InObject)

    Returns the object number for a Raster, Vector, TIN, or CAD object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rin)
         # get the RVC file name
         str$ = GetObjectFileName(Rin)
         objNum = GetObjectNumber(Rin)
         print("Raster Object Number: ", objNum, "RVC file Name: ", str$)
         GetInputVector(Vin)
         # get the RVC file name
         str$ = GetObjectFileName(Vin)
         objNum = GetObjectNumber(Vin)
         print("Vector Object Number: ", objNum, "RVC file Name: ", str$)
         GetInputTIN(Tin)
         # get the RVC file name
         str$ = GetObjectFileName(Tin)
         objNum = GetObjectNumber(Tin)
         print("Tin Object Number: ", objNum, "RVC file Name: ", str$)
    


    GetObjectSize(Object)

    Get the number of bytes in an object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 18-Dec-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GetObjectSize()
    


    GetObjectZExtents(Object, zMin, zMax)

    Returns the z extents for a CAD, TIN, or vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         # vector object
         GetInputVector(V)
         GetObjectZExtents(V, zMin, zMax)
         print("vector z extents - zMin, zMax")
         printf("%10.2f %10.2f \n", zMin, zMax)
    


    MakeRVCFolder(filename$, foldername$, description$, parentfolder$)

    Creates a folder in an RVC project.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         MakeRVCFolder("c:/tnt/testdata.rvc","NickFolder","A folder for Nick","Users");
    


    ObjectExists(filename$, objectname$)

    Determines if object exists in project file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         clear()
         file$="d:/sf_data/haywsoil" ; ob$="hsoils"
         if (ObjectExists(file$, ob$)) then
             print("Object ", ob$, "Exists in ", file$)
    


    ObjectNumber(filename$, objectname$, type$)

    Returns an object number used by several object and display functions

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         fileName$="/data/standard/cb_tm.rvc"
         obname$="TM_2"
         objectNumberber=ObjectNumber(fileName$, obname$, "raster")
         GetObjectDescription(fileName$, objectNumberber)
    


    OpenStyleObject(filename$, objectname$)

    Open a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of OpenStyleObject()
    


    OpenStyleSubObject(Object)

    Open a style subobject

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of OpenStyleSubObject()
    


    ReadMetaData(Object)

    Reads an objects metadata as a string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Jan-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ReadMetaData()
    


    SetObjectDescription(filename$, objectnumber, string$)

    Changes the description of an object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         fileName$="/data/standard/cb_tm.rvc"
         obname$="TM_2"
         objectNumberber=ObjectNumber(fileName$, obname$, "raster")
         SetObjectDescription(fileName$, objectNumberber, "TM Band 2")
    


    SubObjectNumber(filename$, parentobjectnumber, objectname$, type$)

    Returns an object number used by several object and display functions (similar to ObjectNumber() but looks under "parent" object for valid subobject)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

            fileName$="/data/standard/cb_tm.rvc"
            obname$="TM_2"
            objectNumberber=ObjectNumber(fileName$, obname$, "raster")
            subobjectNumber=SubObjectNumber(fileName$, objectNumberber, \
                                     "histogram1","HISTO")
            DeleteObject(fileName$, subobjectNumber)   # delete histogram
    


    WriteMetaData(Object, metaData$)

    Writes metadata to an object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Jan-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of WriteMetaData()
    


    Matrix functions (13)


    AddMatrix(matOut, matLeft, matRight)

    Adds two matrices - (matrixOut = matrixLeft + matrixRight)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create three matrices
         h2 = CreateMatrix(2, 2)
         h3 = CreateMatrix(2, 2)
         # fill the matrices with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               SetMatrixItem(h2, r, c, (r + c) * 2)
               SetMatrixItem(h3, r, c, (r + c) * 3)
               }
            }
         # now add h1 to h2, result is h3
         AddMatrix(h3, h1, h2)
         # print the resulting matrix h3
         print("add h1 + h2")
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h3, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrices
         DestroyMatrix(h1)
         DestroyMatrix(h2)
         DestroyMatrix(h3)
    


    AddMatrixScaler(matrix, value)

    Adds scalar to each element of a matrix

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrix with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         # print the matrix
         print("original matrix")
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         AddMatrixScaler(h1, 100.0) # add 100.0 to each element
         # print the resulting matrix
         print("after adding 100.0 to each element")
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrix
         DestroyMatrix(h1)
    


    CreateMatrix(numRows, numCols)

    Creates a matrix - returns a valid matrix handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrices with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         print("Printing the matrix:") # print the matrix
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrix
         DestroyMatrix(h1)
    


    DestroyMatrix(matrix)

    Destroys a previously created matrix

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrices with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         print("Printing the matrix:")
         # print the matrix
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrix
         DestroyMatrix(h1)
    


    GetMatrixColSize(matrix)

    Returns the number of columns in a matrix

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         #
         # proc printMatrixToConsole(matHandle, formatStr$)
         #
         # procedure to print out a matrix to console - row major order
         # parameters:
         #    matHandle   a matrix handle
         #    format$     string to control output format
         #
         proc printMatrixToConsole(matHandle, formatStr$) {
         # print the matrix handle
         printf("%s%d\n", "Matrix: ", matHandle)
         # get the size of the matrix
         lastRow = GetMatrixRowSize(matHandle) - 1
         lastCol = GetMatrixColSize(matHandle) - 1
         for row = 0 to lastRow {
            for col = 0 to lastCol {
               printf(formatStr$, GetMatrixItem(matHandle, row, col))
               }
            print(" ")
            }
         print(" ") # print blank line after matrix output
         } # end of proc printMatrix()
         # start of code
         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrix with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         # call procedure printMatrixToConsole()
         printMatrixToConsole(h1, "%8.4f ")
         # destroy the matrix
         DestroyMatrix(h1)
    


    GetMatrixItem(matrix, row, col)

    Returns value of matrix element

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         #
         # proc printMatrixToConsole(matHandle, formatStr$)
         #
         # procedure to print out a matrix to console - row major order
         # parameters:
         #    matHandle   a matrix handle
         #    format$     string to control output format
         #
         proc printMatrixToConsole(matHandle, formatStr$) {
         # print the matrix handle
         printf("%s%d\n", "Matrix: ", matHandle)
         # get the size of the matrix
         lastRow = GetMatrixRowSize(matHandle) - 1
         lastCol = GetMatrixColSize(matHandle) - 1
         for row = 0 to lastRow {
            for col = 0 to lastCol {
               printf(formatStr$, GetMatrixItem(matHandle, row, col))
               }
            print(" ")
            }
         print(" ") # print blank line after matrix output
         } # end of proc printMatrix()
         # start of code
         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrix with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         # call procedure printMatrixToConsole()
         printMatrixToConsole(h1, "%8.4f ")
         # destroy the matrices
         DestroyMatrix(h1)
    


    GetMatrixRowSize(matrix)

    Returns the number of rows in a matrix

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         #
         # proc printMatrixToConsole(matHandle, formatStr$)
         #
         # procedure to print out a matrix to console - row major order
         # parameters:
         #    matHandle   a matrix handle
         #    format$     string to control output format
         #
         proc printMatrixToConsole(matHandle, formatStr$) {
         # print the matrix handle
         printf("%s%d\n", "Matrix: ", matHandle)
         # get the size of the matrix
         lastRow = GetMatrixRowSize(matHandle) - 1
         lastCol = GetMatrixColSize(matHandle) - 1
         for row = 0 to lastRow {
            for col = 0 to lastCol {
               printf(formatStr$, GetMatrixItem(matHandle, row, col))
               }
            print(" ")
            }
         printf(" ") # print blank line after matrix output
         } # end of proc printMatrix()
         # start of code
         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrix with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         # call procedure printMatrixToConsole()
         printMatrixToConsole(h1, "%8.4f ")
         # destroy the matrices
         DestroyMatrix(h1)
    


    InvertMatrix(matOut, matIn)

    Inverts a matrix

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         #
         # proc printMatrixToConsole(matHandle, formatStr$)
         #
         # procedure to print out a matrix to console - row major order
         # parameters:
         #    matHandle   a matrix handle
         #    format$     string to control output format
         #
         proc printMatrixToConsole(matHandle, formatStr$) {
         # print the matrix handle
         printf("%s%d\n", "Matrix: ", matHandle)
         # get the size of the matrix
         lastRow = GetMatrixRowSize(matHandle) - 1
         lastCol = GetMatrixColSize(matHandle) - 1
         for row = 0 to lastRow {
            for col = 0 to lastCol {
               printf(formatStr$, GetMatrixItem(matHandle, row, col))
               }
            print(" ")
            }
         print(" ") # print blank line after matrix output
         } # end of proc printMatrix()
         # start of program
         clear()
         h1 = CreateMatrix(2, 2)   # create three matrices
         h2 = CreateMatrix(2, 2)
         h3 = CreateMatrix(2, 2)
         # fill the matrices values known to produce matrix
         # with an inverse
         SetMatrixItem(h1, 0, 0, 1.0)
         SetMatrixItem(h1, 0, 1, 2.0)
         SetMatrixItem(h1, 1, 0, 3.0)
         SetMatrixItem(h1, 1, 1, 4.0)
         # print the resulting matrix
         print("matrix before inverse")
         printMatrixToConsole(h1, "%8.4f ")
         # now calculate the inverse of h1
         InvertMatrix(h2, h1)
         # print the inverse matrix
         # result should be | -2.0  1.0 |
         #                  |  1.5  -.5 |
         print("matrix after inverse")
         printMatrixToConsole(h2, "%8.4f ")
         # now multiply matrix 1 by it's inverse
         # result matrix h3 should be identity matrix
         MultiplyMatrix(h3, h1, h2)
         print("matrix times its inverse")
         printMatrixToConsole(h3, "%8.4f ")
         # destroy the matrices
         DestroyMatrix(h1)
         DestroyMatrix(h2)
         DestroyMatrix(h3)
    


    MultiplyMatrix(matOut, matLeft, matRight)

    Multiplies two matrices - (matrixOut = matrixLeft * matrixRight)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         #
         # proc printMatrixToConsole(matHandle, formatStr$)
         #
         # procedure to print out a matrix to console - row major order
         # parameters:
         #    matHandle   a matrix handle
         #    format$     string to control output format
         #
         proc printMatrixToConsole(matHandle, formatStr$) {
         # print the matrix handle
         printf("%s%d\n", "Matrix: ", matHandle)
         # get the size of the matrix
         lastRow = GetMatrixRowSize(matHandle) - 1
         lastCol = GetMatrixColSize(matHandle) - 1
         for row = 0 to lastRow {
            for col = 0 to lastCol {
               printf(formatStr$, \
               GetMatrixItem(matHandle, row, col))
               }
            print(" ")
            }
         print(" ") # print blank line after matrix output
         } # end of proc printMatrix()
         # start of program
         clear()
         h1 = CreateMatrix(2, 2)   # create three matrices
         h2 = CreateMatrix(2, 2)
         h3 = CreateMatrix(2, 2)
         # create a matrix to test
         # result should be | 1  2 |
         #                  | 3  4 |
         SetMatrixItem(h1, 0, 0, 1.0)
         SetMatrixItem(h1, 0, 1, 2.0)
         SetMatrixItem(h1, 1, 0, 3.0)
         SetMatrixItem(h1, 1, 1, 4.0)
         # print the resulting matrix
         print("Original matrix:")
         printMatrixToConsole(h1, "%8.4f ")
         # create an identity matrix
         # result should be | 1  0 |
         #                  | 0  1 |
         SetMatrixItem(h2, 0, 0, 1.0)
         SetMatrixItem(h2, 0, 1, 0.0)
         SetMatrixItem(h2, 1, 0, 0.0)
         SetMatrixItem(h2, 1, 1, 1.0)
         # print the resulting matrix
         print("Identity matrix:")
         printMatrixToConsole(h2, "%8.4f ")
         # now multiply h1 by the h2 (identity matrix)
         # result in h3
         MultiplyMatrix(h3, h2, h1)
         # print the result - should be same as original
         print("Matrix after multiplication by identity:")
         printMatrixToConsole(h3, "%8.4f ")
         # destroy the matrices
         DestroyMatrix(h1)
         DestroyMatrix(h2)
         DestroyMatrix(h3)
    


    MultiplyMatrixScaler(matrix, value)

    Multiplies each element of a matrix by a scaler

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrix with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         # print the matrix
         print("original matrix")
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # multiply each element by 100.0
         MultiplyMatrixScaler(h1, 100.0)
         # print the resulting matrix
         print("After multiplying each element by 100.0")
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrix
         DestroyMatrix(h1)
    


    SetMatrixItem(matrix, row, col, value)

    Sets the element of a matrix to a value.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create a matrix
         # fill the matrix with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               }
            }
         # print the matrix
         print("The matrix:")
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h1, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrix
         DestroyMatrix(h1)
    


    SubMatrix(matOut, matLeft, matRight)

    Subtracts two matrices - (matrixOut = matrixLeft - matrixRight)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         clear()
         h1 = CreateMatrix(2, 2)   # create three matrices
         h2 = CreateMatrix(2, 2)
         h3 = CreateMatrix(2, 2)
         # fill the matrices with some values
         for r = 0 to 1 {
            for c = 0 to 1 {
               SetMatrixItem(h1, r, c, r + c)
               SetMatrixItem(h2, r, c, (r + c) * 2)
               SetMatrixItem(h3, r, c, (r + c) * 3)
               }
            }
         # now subtract h2 from h1, result is h3
         SubMatrix(h3, h1, h2)
         print("Subtract h2 from h1")
         # print the resulting matrix h3
         for r = 0 to 1 {
            for c = 0 to 1 {
               a = GetMatrixItem(h3, r, c)
               printf("%8.4f ", a)
               }
            print(" ")
            }
         # destroy the matrices
         DestroyMatrix(h1)
         DestroyMatrix(h2)
         DestroyMatrix(h3)
    


    TransposeMatrix(matOut, matIn)

    Transposes rows and columns of a matrix

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Oct-1997
    Modify Date: 08-Mar-1999
    Available in SML for Windows: Yes

    Example:

         #
         # proc printMatrixToConsole (matHandle, formatStr$)
         #
         # procedure to print out a matrix to console - row
         # major order
         # parameters:
         #    matHandle   a matrix handle
         #    format$     string to control output format
         #
         proc printMatrixToConsole(matHandle, formatStr$) {
         # print the matrix handle
         printf("%s%d\n", "Matrix: ", matHandle)
         # get the size of the matrix
         lastRow = GetMatrixRowSize(matHandle) - 1
         lastCol = GetMatrixColSize(matHandle) - 1
         for row = 0 to lastRow {
            for col = 0 to lastCol {
               printf(formatStr$, \
               GetMatrixItem(matHandle, row, col))
               }
            print(" ")
            }
         print( " " ) # print blank line after matrix output
         } # end of proc printMatrix()
         # start of program
         clear()
         h1 = CreateMatrix(2, 2)   # create two matrices
         h2 = CreateMatrix(2, 2)
         # fill the matrix with some values
         SetMatrixItem(h1, 0, 0, 1.0)
         SetMatrixItem(h1, 0, 1, 2.0)
         SetMatrixItem(h1, 1, 0, 3.0)
         SetMatrixItem(h1, 1, 1, 4.0)
         # print the resulting matrix
         # result should be | 1  2 |
         #                  | 3  4 |
         print("matrix before transpose")
         printMatrixToConsole(h1, "%8.4f ")
         # now calculate the transpose of h1
         TransposeMatrix(h2, h1)
         # print the inverse matrix
         # result should be | 1  3 |
         #                  | 2  4 |
         print("matrix after transpose")
         printMatrixToConsole(h2, "%8.4f ")
         # destroy the matrices
         DestroyMatrix(h1)
         DestroyMatrix(h2)
    


    Georeference functions (20)


    CopyGeorefToObject(Object, georef)

    Write a georeference subobject

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 18-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CopyGeorefToObject()
    


    CreateControlPointGeoref(Object, numberPoints, xSource, ySource, zSource, xDestination, yDestination, zDestination, xSourceAccuracy, ySourceAccuracy, zSourceAccuracy, xDestinationAccuracy, yDestinationAccuracy, zDestinationAccuracy, mapProjectionParm)

    Creates a control point georeference object.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # SML script to demonstrate creation of georef object in SML
         #
         # 1. opens a raster - cb_tm/blue
         # 2. creates a new vector object and draws a box
         # 3. georeferences the vector so that it bounds the raster
         #
         # NOTES:
         # 1. you must use a minimum of three control points
         # 2. they must not be all on the same line!
         #
         #################################################################
         # alternate method to get extents of object
         #
         # can use this in general - if last parm is omitted then
         # returns object coordinates
         #
         # rgeoref = GetLastUsedGeorefObject(Rin)
         # GetObjectExtents(Rin, rxMin, ryMin, rxMax, ryMax, rgeoref)
         #
         # now do same for vector except do not use georef parm
         # this will give object coordinates
         # GetObjectExtents(Vout, vxMin, vyMin, vxMax, vyMax)
         #
         #################################################################
         # the source arrays will hold the object coordinates
         # for a raster this would be cell values
         # for vector, CAD, TIN it would be object, (non-georeferenced),
         # coordinates
         array xsrc[5], ysrc[5], zsrc[5]
         # the destination arrays will hold the appropriate,
         # (georeferenced), values
         array xdest[5], ydest[5], zdest[5]
         # arrays to hold vector points to draw box
         array xpoints[10]
         array ypoints[10]
         # fill in the control points (source and destination)
         # need a minimum of three
         # we will assume a georeferenced raster and a non-georeferenced
         # vector that we wish to georeference to the raster
         clear()
         # get the raster and vector
         GetInputRaster(Rin)
         # get number of lines and columns
         numlines = NumLins(Rin)
         numcols = NumCols(Rin)
         # get the upper left (UL), lower right (LR)
         # upper right (UR), and lower left (LL) coordinates
         rgeoref = GetLastUsedGeorefObject(Rin)
         ObjectToMap(Rin, 0, 0, rgeoref, xUL, yUL)
         ObjectToMap(Rin, numcols, numlines, rgeoref, xLR, yLR)
         ObjectToMap(Rin, numcols, 0, rgeoref, xUR, yUR)
         ObjectToMap(Rin, 0, numlines, rgeoref, xLL, yLL)
         printf("UL: %7.2f %7.2f\n", xUL, yUL)
         printf("UR: %7.2f %7.2f\n", xUR, yUR)
         printf("LL: %7.2f %7.2f\n", xLL, yLL)
         printf("LR: %7.2f %7.2f\n", xLR, yLR)
         # create a new vector here !!!!
         # we will draw a box and match it to the raster
         GetOutputVector(Vout, "VectorToolkit")
         # draw the box - this will create a polygon
         # fill in the points
         xpoints[1] = 0
         ypoints[1] = 0
         xpoints[2] = 100
         ypoints[2] = 0
         xpoints[3] = 100
         ypoints[3] = 100
         xpoints[4] = 0
         ypoints[4] = 100
         xpoints[5] = 0
         ypoints[5] = 0
         VectorAddLine(Vout, 5, xpoints, ypoints)
         # fill in four control points - one for each corner
         # the source values are for the vector
         # control point 1 - upper left corner
         xsrc[1] = 0
         ysrc[1] = 100
         zsrc[1] = 0
         xdest[1] = xUL
         ydest[1] = yUL
         zdest[1] = 0
         # control point 2 - lower right corner
         xsrc[2] = 100
         ysrc[2] = 0
         zsrc[2] = 0
         xdest[2] = xLR
         ydest[2] = yLR
         zdest[2] = 0
         # control point 3 - upper right corner
         xsrc[3] = 100
         ysrc[3] = 100
         zsrc[3] = 0
         xdest[3] = xUR
         ydest[3] = yUR
         zdest[3] = 0
         # control point 3 - lower left corner
         xsrc[4] = 0
         ysrc[4] = 0
         zsrc[4] = 0
         xdest[4] = xLL
         ydest[4] = yLL
         zdest[4] = 0
         # print out the control points
         for i = 1 to 4 {
            printf("%s %2d %7.2f %7.2f %7.2f  ",
                   "i: xsrc, ysrc, zsrc, xdest, ydest, zdest ",
                   i, xsrc[i], ysrc[i], zsrc[i])
            printf("%7.2f %7.2f %7.2f\n", xdest[i], ydest[i], zdest[i])
            }
         # set number of control points
         numberPoints = 4
         # now create the georef via dialog
         CreateControlPointGeoref(Vout, numberPoints, xsrc, ysrc, zsrc,
                                  xdest, ydest, zdest)
         GeorefFree(rgeoref) # clean up
         CloseRaster(Rin)
    


    CreateControlPointGeorefDefaultAccuracy(Object, mapProjectionParm, numberPoints, xSource, ySource, xDestination, yDestination, zDestination)

    Same as CreateControlPointGeoref but without accuracy parameters

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-May-2001
    Modify Date: none
    Available in SML for Windows: Yes


    CreateControlPointGeorefFromGeoref(Object, georef, numberPoints, xSource, ySource, zSource, xDestination, yDestination, zDestination, xSourceAccuracy, ySourceAccuracy, zSourceAccuracy, xDestinationAccuracy, yDestinationAccuracy, zDestinationAccuracy)

    Creates a control point georeference object using an existing georeference for the projection system.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of CreateControlPointGeorefFromGeoref()
          array xsrc[5], ysrc[5], zsrc[5]
          array xdest[5], ydest[5], zdest[5]
          clear()
          # get the raster
          GetInputRaster(RIn)
          #create a new raster
          CreateRaster(RNew, "c:/tnt/win32/newras.rvc", "newras", "description", 200, 200, "8-bit unsigned");
          # duplicate the corrosponding values
          for r = 1 to 200 {
             for c = 1 to 200 {
                RNew[r,c] = RIn[r,c];
                }
             }
          # get number of lines and columns
          numlines = NumLins(RIn)
          numcols = NumCols(RIn)
          # get the upper left (UL), lower right (LR)
          # upper right (UR), and lower left (LL) coordinates
          # of the portion of the raster we are going to duplicate
          geoOrg = GetLastUsedGeorefObject(RIn)
          ObjectToMap(RIn, 0, 0, geoOrg, xUL, yUL)
          ObjectToMap(RIn, 200, 200, geoOrg, xLR, yLR)
          ObjectToMap(RIn, 200, 0, geoOrg, xUR, yUR)
          ObjectToMap(RIn, 0, 200, geoOrg, xLL, yLL)
          printf("UL: %7.2f %7.2f\n", xUL, yUL)
          printf("UR: %7.2f %7.2f\n", xUR, yUR)
          printf("LL: %7.2f %7.2f\n", xLL, yLL)
          printf("LR: %7.2f %7.2f\n", xLR, yLR)
          # fill in four control points - one for each corner
     
          # control point 1 - upper left corner
          xsrc[1] = 0
          ysrc[1] = 0
          zsrc[1] = 0
          xdest[1] = xUL
          ydest[1] = yUL
          zdest[1] = 0
          # control point 2 - lower right corner
          xsrc[2] = 200
          ysrc[2] = 200
          zsrc[2] = 0
          xdest[2] = xLR
          ydest[2] = yLR
          zdest[2] = 0
          # control point 3 - upper right corner
          xsrc[3] = 200
          ysrc[3] = 0
          zsrc[3] = 0
          xdest[3] = xUR
          ydest[3] = yUR
          zdest[3] = 0
          # control point 3 - lower left corner
          xsrc[4] = 0
          ysrc[4] = 200
          zsrc[4] = 0
          xdest[4] = xLL
          ydest[4] = yLL
          zdest[4] = 0
          # print out the control points
          for i = 1 to 4 {
             printf("%s %2d %7.2f %7.2f %7.2f  ", "i: xsrc, ysrc, zsrc, xdest, ydest, zdest ", i, xsrc[i], ysrc[i], zsrc[i])
             printf("%7.2f %7.2f %7.2f\n", xdest[i], ydest[i], zdest[i])
             }
          # set number of control points
          numpoints = 4
          # now create the georef without dialog
          geoNew = CreateControlPointGeorefFromGeoref(RNew, geoOrg, numpoints, xsrc, ysrc, zsrc, xdest, ydest, zdest)
          GeorefFree(geoOrg)
          GeorefFree(geoNew)
          CloseRaster(RIn);
          CloseRaster(RNew);
    


    CreateImpliedGeoref(Object, mapProjectionParm)

    Create an implied georeference subobject

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-May-2000
    Modify Date: none
    Available in SML for Windows: Yes


    DeleteGeoref(Object)

    Delete georef subobjects of raster Rvar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         DeleteGeoref(Rvar)
    


    GeorefAlloc()

    Returns number of a new georeference subobject

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         geonum1 = GeorefAlloc() ; geonum2 = GeorefAlloc()
         print(geonum1, geonum2)
         GeorefFree(geonum1) ; GeorefFree(geonum2)
    


    GeorefAngleToNorth(georef, x, y)

    Returns the angle between north and a line from center to x,y

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         georef = GetGeorefObject(R)
         print("Enter x value.") ; x = input()
         print("Enter y value.") ; y = input()
         angle = GeorefAngleToNorth(georef, x, y)
         print("Angle between line connecting center of object ",
               "to x,y and true north:",angle/deg)
         CloseRaster(R)
    


    GeorefFree(georef)

    Free georeference object with num as its ID

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         geonum = GeorefAlloc() ; print(geonum)
         GeorefFree(geonum)
    


    GeorefGetParms(georef)

    Open dialog for selecting georeference subobject

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)   # get input raster
         g = GetGeorefObject(R)   # get georeference of object
         # change parameters of that georeference and
         # copy the results to a new ID
         h = GeorefGetParms(g)
         print(g, h)
         GeorefFree(g) ; CloseRaster(R)
    


    GeorefSetProjection(georef, projection)

    Set the projection of a Georef

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GeorefSetProjection()
    


    GeorefTrans(from_georef, from_x, from_y, to_georef, to_x, to_y)

    Transform point to new georeferenced value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         g1 = GetGeorefObject(R)
         print("Enter x1") ; input x1
         print("Enter x2") ; input x2
         g2 = GeorefGetParms()
         GeorefTrans(g1, x1, y1, g2, x2, y2)
         print("Original: ", x1, y1)
         print("\nNew: ", x2, y2)
         GeorefFree(g) ; CloseRaster(R)
    


    GetGeorefObject(Object)

    Return ID number of named georeference subobject

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(R)
         g=GetGeorefObject(R)
         # get georeference, change projection
         GeorefGetParms(g)
         # Do something with the georef here
         GeorefFree(g)
    


    GetLastUsedGeorefObject(Object)

    Return number of a most recently used georeference subobject

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(R)
         g=GetLastUsedGeorefObject(R)
         # get most recent georeference
         # Translate top left corner of raster to
         # map coordinates last used by R
         ObjectToMap(R, 0, 0, g, s, y)
         print("Top left corner is at\nLat: ", y, "\nlon: ", x)
         GeorefFree(g) ; CloseRaster(R)
    


    MapToObject(georef, map_x, map_y, Object, x, y)

    Transform georeferenced location from map coordinates to object coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         g=GetGeorefObject(R)
         print("Enter x1.") ; input(x1)
         print("Enter y1.") ; input(y1)
         MapToObject(g, x1, y1, R, x2, y2)
         print("Map: ", x1, y1) ; print("/nObject: ", x2, y2)
         GeorefFree(g) ; CloseRaster(R)
    


    ObjectToMap(Object, x, y, georef, map_x, map_y)

    Transform object coordinates to georeferenced location

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         g=GetGeorefObject(R)
         print("Enter ox.") ; input(x1)
         print("Enter oy.") ; input(y1)
         ObjectToMap(g, x1, y1, R, x2, y2)
         print("Object: ", ox,o y) ; print("/nMap: ", mx, my)
         GeorefFree(g) ; CloseRaster(R)
    


    ProjDistanceToMeters(projection, x1, y1, x2, y2)

    Compute distance in meters between two points in specified projection. If the coordinate system is Latitude-Longitude the distance along a geodetic is returned (actual distance over curved surface).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Jan-2001
    Modify Date: none
    Available in SML for Windows: Yes


    ReadControlPoints(Object, xSource, ySource, zSource, xDestination, yDestination, zDestination)

    Reads the control points of the last used georeference attached to an object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ReadControlPoints()
          array xS[5], yS[5], zS[5], xD[5], yD[5], zD[5]
          clear();
          GetInputRaster(R);
          numPoints = ReadControlPoints(R, xS, yS, zS, xD, yD, zD);
          for i = 1 to numPoints {
             print(xS[i], yS[i], zS[i], " - ", xD[i], yD[i], zD[i]);
             }
    


    TransPoint2D(point, transparm, invert)

    Transform 2D point using transparm

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-May-1998
    Modify Date: 22-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of TransPoint2D()
    


    WriteControlPoints(Object, numberPoints, xSource, ySource, zSource, xDestination, yDestination, zDestination)

    Write control points to the last used georeference attached to an object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of WriteControlPoints()
          array xS[5], yS[5], zS[5], xD[5], yD[5], zD[5]
          xS[1] = 0;
          yS[1] = 0;
          zS[1] = 0;
          xD[1] = 333354;
          yD[1] = 162833;
          zD[1] = 0;
          xS[2] = 361;
          yS[2] = 488;
          zS[2] = 0;
          xD[2] = 343050;
          yD[2] = 148559;
          zD[2] = 0;
          xS[3] = 0;
          yS[3] = 488;
          zS[3] = 0;
          xD[3] = 332803;
          yD[3] = 148958;
          zD[3] = 0;
          xS[4] = 361;
          yS[4] = 0;
          zS[4] = 0;
          xD[4] = 343000;
          yD[4] = 162000;
          zD[4] = 0;
          GetInputRaster(R);
          WriteControlPoints(R, 4, xS, yS, zS, xD, yD, zD);
    


    Color Palette functions (6)


    ColorMapFromRastVar(Raster, nameOrNum)

    Read colormap from under raster.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ColorMapFromRastVar()
    


    ColorMapGetColor(colormap, index)

    Get a color from a colormap

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ColorMapGetColor()
    


    ColorMapSetColor(colormap, index, color)

    Set a colormap color given a class color structure.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ColorMapSetColor()
    


    ColorMapSetColorHIS(colormap, index, hue, intensity, saturation)

    Set a colormap color to given HIS values.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ColorMapSetColorHIS()
    


    ColorMapSetColorRGB(colormap, index, red, green, blue, range)

    Set a colormap color to given RGB values.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ColorMapSetColorRGB()
    


    ColorMapWriteToRastVar(Raster, colormap, name$, description$)

    Write a colormap under a raster.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ColorMapWriteToRastVar()
    


    Style functions (7)


    StyleReadBitmapPattern(style, name$)

    Read a BITMAPPATTERN from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of StyleReadBitmapPattern()
    


    StyleReadLinePattern(style, name$)

    Read a LINEPATTERN from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of StyleReadLinePattern()
    


    StyleReadLineStyle(styleobj, stylename$)

    Read a line style from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Sep-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of StyleReadLineStyle()
    


    StyleReadPointStyle(styleobj, stylename$)

    Read a point style from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Sep-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of StyleReadPointStyle()
    


    StyleReadPointSymbol(style, name$)

    Read a POINTSYMBOL from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of StyleReadPointSymbol()
    


    StyleReadPolyStyle(styleobj, stylename$)

    Read a polygon style from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Sep-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of StyleReadPolyStyle()
    


    StyleReadTextStyle(styleobj, stylename$)

    Read a text style from a style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Sep-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of StyleReadTextStyle()
    


    System functions (8)


    AddCallback(callback, function, data)

    Add a user defined callback

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of AddCallback()
    


    Exit()

    Exit the script (calls functions registered with OnExit).

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of Exit()
    


    OnExit(function, data)

    Register function to call just before script exits.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of OnExit()
    


    run(command$, wait)

    Runs another command

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         run("something", 0)   # run in background
    


    RunAssociatedApplication(filename$)

    Runs application associated with passed file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 18-Oct-2000
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

    RunAssociatedApplication("c:/temp/sample.txt");	# Opens sample.txt with associated application
    


    RunSML(filename$, objectname$)

    Run an SML script

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 08-May-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of RunSML()
    


    sleep(seconds)

    Pause execution for a number of seconds.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of sleep()
    


    WaitForExit()

    Suspend script but process callbacks and events.

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of WaitForExit()
    


    Object Conversion functions (24)


    BinaryRasterToRegion(Raster, georef)

    Convert a binary raster to a region

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of BinaryRasterToRegion()
    


    ConvertCMYKtoRGB(maxrgbvalue, c, m, y, k, red, green, blue)

    Convert Cyan-Magenta-Yellow-Black to Red-Green-Blue

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 08-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ConvertCMYKtoRGB()
          clear();
          c = 100;
          m = 100;
          y = 100;
          k = 101;
          ConvertCMYKtoRGB(255, c, m, y, k, red, green, blue);
          format$ = "%3d %3d %3d %3d - %3d %3d %3d"
          printf(format$, c, m, y, k, red, green, blue);
    


    ConvertHBStoRGB(hue, saturation, value, red, green, blue)

    Convert hue, brightness, saturation to red, green, blue

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ConvertHBStoRGB()
          h = 180;
          b = 50;
          s = 50;
          ConvertHBStoRGB(h, s, v, r, g, b);
          printf("hbs - rgb  %3d %3d %3d - %3d %3d %3d\n", h, s, v, r, g, b);
    


    ConvertHIStoRGB(maxrgbvalue, hue, intensity, saturation, red, green, blue)

    Convert from hue, intensity, saturation to red, green, blue

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # rgbhis.sml
         # convert between rgb and his
         # each function also takes a maximum rgb value for proper scaling
         # max for 8-bit unsigned = 255
         # max for 16-bit unsigned = 65535
         clear()
         maxrgb = 255
         for h = 1 to 360 step 179 {
            for i = 1 to 100 step 49 {
               for s = 1 to 100 step 49 {
                     ConvertHIStoRGB(maxrgb, h, i, s, r, g, b)
                     printf("%s: %6d %6d %6d %6d %6d %6d \n",
                        "his -> rgb", h, i, s, r, g, b)
                     }
               }
            }
         for r = 1 to 255 step 100 {
            for g = 1 to 255 step 100 {
               for b = 1 to 255 step 100 {
                     ConvertRGBtoHIS(maxrgb, r, g, b, h, i, s)
                     printf("%s: %6d %6d %6d %6d %6d %6d \n",
                        "rgb -> his", r, g, b, h, i, s)
                     }
               }
            }
    


    ConvertHSVtoRGB(hue, saturation, value, red, green, blue)

    Convert hue, saturation, value to red, green, blue

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ConvertHSVtoRGB()
          h = 180;
          s = 50;
          v = 50;
          ConvertHSVoRGB(h, s, v, r, g, b);
          printf("hsv - rgb  %3d %3d %3d - %3d %3d %3d\n", h, s, v, r, g, b);
    


    ConvertRegionToVect(Region)

    Converts a Region to a Vector.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of ConvertRegionToVect()
    


    ConvertRGBtoHBS(red, green, blue, hue, brightness, saturation)

    Convert red, green, blue, to hue, brightness, saturation

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ConvertRGBtoHBS()
          r = 127;
          g = 127;
          b = 127;
          ConvertRGBtoHBS(r, g, b, h, s, v)
          printf("rgb - hbs  %3d %3d %3d - %3d %3d %3d\n", r, g, b, h, s, v);
    


    ConvertRGBtoHIS(maxrgbvalue, red, green, blue, hue, intensity, saturation)

    Convert from red, green, blue to hue, intensity, saturation

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # rgbhis.sml
         # convert between rgb and his
         # each function also takes a maximum rgb value for proper scaling
         # max for 8-bit unsigned = 255
         # max for 16-bit unsigned = 65535
         clear()
         maxrgb = 255
         for h = 1 to 360 step 179 {
            for i = 1 to 100 step 49 {
               for s = 1 to 100 step 49 {
                     ConvertHIStoRGB(maxrgb, h, i, s, r, g, b)
                     printf("%s: %6d %6d %6d %6d %6d %6d \n",
                        "his -> rgb", h, i, s, r, g, b)
                     }
               }
            }
         for r = 1 to 255 step 100 {
            for g = 1 to 255 step 100 {
               for b = 1 to 255 step 100 {
                     ConvertRGBtoHIS(maxrgb, r, g, b, h, i, s)
                     printf("%s: %6d %6d %6d %6d %6d %6d \n",
                        "rgb -> his", r, g, b, h, i, s)
                     }
               }
            }
    


    ConvertRGBtoHSV(red, green, blue, hue, saturation, value)

    Convert red, green, blue to hue, saturation, value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ConvertRGBtoHSV()
          r = 127;
          g = 127;
          b = 127;
          ConvertRGBtoHBS(r, g, b, h, s, v)
          printf("rgb - hsv  %3d %3d %3d - %3d %3d %3d\n", r, g, b, h, s, v);
    


    ConvertVectorPolysToRegion(Vector, georef, elementList, numberElements)

    Converts selected Vector elements to a region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of ConvertVectorPolysToRegion()
          array polygonList[10]
          polygonList[1] = 2
          polygonList[2] = 4
          numberPolygons = 2
          GetInputVector(VIn)
          georef = GetLastUsedGeorefObject(VIn)
          GetOutputRegion(RegionOut)
          RegionOut = ConvertVectorPolysToRegion(Vin, georef, polygonList, numberPolygons)
    


    ConvertVectorPolyToRegion(Vector, polygonNumber, georef)

    Converts single polygon to a region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of ConvertVectorPolyToRegion()
          # convert single polygon to a region
          GetInputVector(VIn)
          GetOutputRegion(RegionOut)
          # convert first polygon
          RegionOut = ConvertVectorPolyToRegion(VIn, 1)
    


    ConvertVectToRegion(Vector)

    Converts a Vector to a Region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # example of ConvertVectToRegion()
          GetInputVector(VIn)
          georef = GetLastUsedGeorefObject(VIn)
          GetOutputRegion(Region1)
          Region1 = ConvertVectToRegion(VIn)
    


    RasterCompositeToRGB(CompositeRaster, RedRaster, GreenRaster, BlueRaster, rvcFilename$, rgbDescription$)

    Convert 24 bit composite Raster to RGB

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-May-1998
    Modify Date: 19-May-1998
    Available in SML for Windows: Yes

    Example:

           # example of RasterCompositeToRGB()
           OpenRaster(C1, "c:/tnt/win32/projects/rgbcomp/input.rvc", "_24BIT_RGB");
           RasterCompositeToRGB(C1, R1, G1, B1, "c:/tnt/win32/projects/rgbcomp/output.rvc", "from _24BIT_RGB");
           RasterRGBToComposite(R1, G1, B1, CompOut, "c:/tnt/win32/projects/rgbcomp/composite.rvc", "comp", "composite from RGB");
    


    RasterRGBToComposite(RedRaster, GreenRaster, BlueRaster, CompositeRaster, rvcFilename$, compositeName$, compositeDescription$, numberOfBits)

    Convert RGB Rasters to 24 bit composite

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-May-1998
    Modify Date: 19-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of RasterRGBToComposite()
           OpenRaster(C1, "c:/tnt/win32/projects/rgbcomp/input.rvc", "_24BIT_RGB");
           RasterCompositeToRGB(C1, R1, G1, B1, "c:/tnt/win32/projects/rgbcomp/output.rvc", "from _24BIT_RGB");
           RasterRGBToComposite(R1, G1, B1, CompOut, "c:/tnt/win32/projects/rgbcomp/composite.rvc", "comp", "composite from RGB");
    


    RasterToCADBound(RasterVar)

    Convert Raster to Vector boundary.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of RasterToCADBound()
          GetInputRaster(RIn)
          GetOutputCAD(COut)
          COut = RasterToCADBound(RIn)
    


    RasterToCADLine(RasterVar, thinfactor, flags)

    Convert Raster to CAD lines.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of RasterToCADLine()
          GetInputRaster(RIn)
          GetOutputCAD(COut)
          thinFactor = 1
          traceValue = 1
          COut = RasterToCADLine(RIn, thinFactor, traceValue)
    


    RasterToTINIterative(InputRaster, zTolerance, maxNodes, zDelta, shortEdge, longEdge, flags)

    Converts elevation raster to TIN object as contour lines

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # set up variables to hold flag values
         flagDefault = 0
         flagComputeStatistics = 1
         flagDoTINOptimize = 2
         GetInputRaster(Rin)
         GetOutputTIN(Tout)
         range = GlobalMax(Rin) - GlobalMin(Rin)
         zTolerance = range / 100
         maxNodes = 1000
         zDelta = 0
         shortEdge = 0
         longEdge = 0
         flags = 0
         Tout = RasterToTINIterative(Rin, zTolerance, maxNodes, zDelta,
                                     shortEdge, longEdge, flags)
         CloseRaster(Rin)
    


    RasterToVectorBound(RasterVar, flags)

    Convert Raster to Vector boundary.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of RasterToVectorBound()
          GetInputRaster(RIn)
          GetOutputVector(VOut)
          flag = 0
          VOut = RasterToVectorBound(RIn, flag)
    


    RasterToVectorContour(InputRaster, zInterval, zStart, zEnd, zScale, zOffset, sampleRate, resolution, filterSize, flags)

    Converts elevation raster to vector object as contour lines

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # set up variables to hold flag values
         flagDefault = 0
         flagLogScale = 1
         flagBicubicInterpolate = 2
         flagUseSmoothing = 4
         GetInputRaster(Rin)
         GetOutputVector(Vout)
         zStart = GlobalMin(Rin) # set range to raster limits
         zEnd = GlobalMax(Rin)
         range = zEnd - zStart
         zInterval = range / 40 # set 40 contours
         zScale = 1
         zOffset = 0
         sampleRate = 1
         resolution = 2
         filterSize = 1
         flags = flagLogScale + flagUseSmoothing
         clear()
         print(zStart, zEnd, zInterval, zScale, zOffset,
             sampleRate, resolution, filterSize, flags)
         Vout = RasterToVectorContour(Rin, zInterval, zStart, zEnd, zScale,
                                      zOffset, sampleRate, resolution,
                                      filterSize, flags)
         # alternate form - use defaults
         # Vout = RasterToVectorContour(Rin, zInterval)
         CloseRaster(Rin)
    


    RasterToVectorLine(RasterVar, thinfactor, flags)

    Convert Raster to Vector lines.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of RasterToVectorLine()
          GetInputRaster(RIn)
          GetOutputVector(VOut)
          thinFactor = 1
          traceValue = 1
          VOut = RasterToVectorLine(RIn, thinFactor, traceValue)
    


    TINToRaster(InTIN, OutRaster, method, flags)

    Converts TIN object to Raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # set up variables to use for method and flags
         methodLinear = 0
         methodQuintic = 1
         flagDefault = 0
         flagCopyGeoref = 1
         flagAutoscale = 2
         # get the input and output objects
         GetInputTIN(Tin)
         GetOutputRaster(Rout)
         method = methodQuintic
         flags = flagCopyGeoref + flagAutoscale # to do both
         TINToRaster(Tin, Rout, method, flags)
         # other other optional function calls
         # to use default method and flags
         # TINToRaster(Tin, Rout)
         # to use default flags but set method
         # TINToRaster(Tin, Rout, method)
         CloseRaster(Rout)
    


    TINToVectorContour(InTIN, zInterval, flags, zStart, zEnd, zScale, zOffset)

    Converts TIN object to vector object as contour lines

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # set up variables to hold flag values
         flagDefault = 0
         flagLogScale = 1
         GetInputTIN(Tin)
         GetOutputVector(Vout1)
         print("calling TinToVectorContour for Vout1")
         zInterval = 20
         Vout1 = TINToVectorContour(Tin, zInterval)
         print("Done with Vout1")
         GetOutputVector(Vout2)
         print("calling TinToVectorContour for Vout2")
         zInterval = 40
         Vout2 = TINToVectorContour(Tin, zInterval, flagDefault)
         print("Done with Vout1")
         GetOutputVector(Vout3)
         print("calling TinToVectorContour for Vout3")
         zInterval = 40
         # set values that work for CB_ELEV/TIN_16
         zStart = 1060
         zEnd = 1360
         zScale = 1
         zOffset = 0
         Vout3 = TINToVectorContour(Tin, zInterval, flagLogScale,
                                    zInterval, zStart, zEnd, zScale)
         print("Done with Vout3")
    


    VectorElementToRaster(Vector, Raster, elementType$, elementNumber, rasterValue, vectorGeo, rasterGeo)

    Convert Vector element to a raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Apr-1998
    Modify Date: 10-Jun-1998
    Available in SML for Windows: Yes

    Example:

        # example of VectorElementToRaster()
        GetInputVector(V);
        GetInputRaster(R);
        vGeo = GetLastUsedGeorefObject(V);
        rGeo = GetLastUsedGeorefObject(R);
        VectorElementToRaster(V, R, "polygon", 22,   0, vGeo, rGeo);
        VectorElementToRaster(V, R,    "line", 10, 128, vGeo, rGeo);
        CloseRaster(R);
        CloseVector(V);
        print("done");
    


    VectorToBufferZone(VectIn, elementtypeflag$, distance, unitsflag$, polysideflag$, elementlist, numelements)

    Create buffer zone Vector from selected Vector elements of a given type, (or all elements of a given type).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of VectorToBufferZone()
          array elementList[1000]
          GetInputVector(VIn)
          GetOutputVector(VOut)
          numberLines = NumVectorLines(VIn)
          for i = 1 to numberLines / 2 {
              elementList[i] = i
              }
          VOut = VectorToBufferZone(VIn, "line", 50, "meters", "both", elementList, numberLines / 2)
    


    Popup Dialog functions (9)


    GetInputObject(objectType$, prompt$, rvcFilename$, objectName$)

    Popup dialog to select an object and return info

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes


    GetOutputObject(objectType$, newOrExisting$, prompt$, rvcFilename$, objectName$, objectDescription$)

    Prompt the user for an output object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GetOutputObject()
    


    PopupError(error_code)

    Displays a popup window and displays the text associated with error_code

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         PopupError(-1012)   # error codes are always negative
    


    PopupMessage(message$)

    Open popup window with message and [OK] choice

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         PopupMessage("Hello!")
    


    PopupNum(prompt$, default, min, max, decimal_places)

    Open popup window asking for a number

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         PopupNum("Value?", 1, 10, 0, 2)
    


    PopupSelectTableField(database, table$, field$)

    Popup dialog for user to select a table and field

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Oct-2000
    Modify Date: none
    Available in SML for Windows: No

    Example:

    database = OpenVectorPolyDatabase(vector);
    PopupSelectTableField(database, table$, field$);
    


    PopupString(prompt$, default$)

    Open popup window asking for a string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         a$ = PopupString("Enter a string.", "Or use this default string.")
         print(a$)
    


    PopupYesNo(prompt$, default)

    Open popup window asking for a yes or no input

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         print(PopupYesNo("Continue?", 1))
    


    PopupYesNoCancel(prompt$, default)

    Open popup window asking for a yes, no or cancel

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         print(PopupYesNoCancel("Continue?", 1))
    


    CAD functions (40)


    CADAttachDBRecord(CADvar, block, elemnum, table, recnum)

    Attach a database record to a CAD element

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-May-2000
    Modify Date: none
    Available in SML for Windows: Yes


    CADCreateBlock(CADvar, blockname$, blockdesc$)

    Create a new CAD block for element insertion

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # subblock.sml
         # demonstrates creating and inserting a subblock
         GetOutputCAD(C)
         # first create a box in block 1
         CADWriteBox(C, 1, 0, 0, 100, 100, 0)
         # now create a subblock
         CADCreateBlock(C,"BLOCK2", "subblock")
         # create a small box in the subblock
         CADWriteBox(C, 2, 0, 0, 10, 10, 45)
         # now insert with replication - create a grid
         destblock = 1
         sourceblock = 2
         xinsert = 0
         yinsert = 0
         xScale = 1
         yscale = 1
         rotate = 0
         numlines = 10
         numcols = 10
         linespace = 10
         colspace = 10
         CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert,
                        xScale, yscale, rotate, numlines, numcols,
                        linespace, colspace)
         CloseCAD(C)
    


    CADElementInRegion(Rgnvar, CADvar, block, element, flag1$, flag2$)

    Tests a CAD element against a region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CADElementInRegion()
        clear()
        # open existing file
        GetOutputCAD(C)
        GetInputRegion(Rgn)
        numberElements = CADNumElements(C, block)
        block = 1
        for i = 1 to numberElements {
           elemtype$ = CADElementType(C, block, i)
           inRegion = CADElementInRegion(Rgn, C, block, i, "CompletelyInside")
           if (inRegion)
              print(elemtype$, "element ", i, "is CompletelyInside")
           inRegion = CADElementInRegion(Rgn, C, block, i, "PartlyInside")
           if (inRegion)
              print(elemtype$, "element ", i, "is PartLyInside")
           inRegion = CADElementInRegion(Rgn, C, block, i, "CompletelyOutside")
           if (inRegion)
              print(elemtype$, "element ", i, "is CompletelyOutside")
           inRegion = CADElementInRegion(Rgn, C, block, i, "PartlyOutside")
           if (inRegion)
              print(elemtype$, "element ", i, "is PartlyOutside")
           print("\n")
           }
        CloseCAD(C)
    


    CADElementType(CADvar, block, element)

    Returns type of CAD element.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of CADElementType()
          # read the number of blocks in a CAD object
          # and then loop through all the blocks and print out type of each element
          clear()
          GetInputCAD(C)
          numBlocks = CADNumBlocks(C)
          print("number of blocks: ", numBlocks)
          # loop through all blocks
          for blk = 1 to numBlocks {
              numElements = CADNumElements(C, blk)
              printf("block: %3d number of elements: %5d \n\n", blk, numElements)
              # loop through all elements
              for elem = 1 to numElements {
                 # get the element type
                 elem$ = CADElementType(C, blk, elem)
                 printf("block: %3d element: %5d type: %s\n", blk, elem, elem$)
                 }
              }
          CloseCAD(C)
    


    CADGetElementList(CADvar, block, elemtype$, elemlist)

    Get list of all elements of a given type in a block

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # elemlist.sml
         # demonstrates how to get a list of elements of a specified
         # type in a block
         # define array to hold element list - will be resized to fit
         # array elemlist[10]
         clear()
         GetInputCAD(C)
         numElem = CADNumElements(C, 1)
         # get list of lines
         numLines = CADGetElementList( C, 1, "Line", elemlist )
         printf("number of elements: %4d number of lines: %4d \n", numElem,
                numLines)
         print("Line list:\n")
         for elem = 1 to numLines {
            printf("%4d %4d\n", elem, elemlist[elem])
            }
         CloseCAD(C)
    


    CADInsertBlock(CADvar, destblock, sourceblock, xinsert, yinsert, xscale, yscale, rotate, numlines, numcols, linespace, colspace)

    Create a new CAD block for element insertion

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # subblock.sml
         # demonstrates creating and inserting a subblock
         GetOutputCAD(C)
         # first create a box in block 1
         CADWriteBox(C, 1, 0, 0, 100, 100, 0)
         # now create a subblock
         CADCreateBlock(C,"BLOCK2", "subblock")
         # create a small box in the subblock
         CADWriteBox(C, 2, 0, 0, 10, 10, 45)
         # now insert with replication - create a grid
         destblock = 1
         sourceblock = 2
         xinsert = 0
         yinsert = 0
         xScale = 1
         yscale = 1
         rotate = 0
         numlines = 10
         numcols = 10
         linespace = 10
         colspace = 10
         CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert,
                        xScale, yscale, rotate, numlines, numcols,
                        linespace, colspace)
         CloseCAD(C)
    


    CADNumBlocks(CADvar)

    Returns number of blocks in a CAD object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # readelem.sml
         # demonstrate how to read the number of blocks in a CAD object
         # and then loop through all the blocks and print out type of
         # each element
         clear()
         GetInputCAD(C)
         numBlocks = CADNumBlocks(C)
         print("number of blocks: ", numBlocks)
         # loop through all blocks
         for blk = 1 to numBlocks {
            numElements = CADNumElements(C, blk)
            printf("block: %3d number of elements: %5d \n\n",
                   blk, numElements)
            # loop through all elements
            for elem = 1 to numElements {
               # get the element type
               elem$ = CADElementType(C, blk, elem)
               printf("block: %3d element: %5d type: %s\n",
                      blk, elem, elem$)
               }
            }
         CloseCAD(C)
    


    CADNumElements(CADvar, block)

    Returns number of elements of all types in CAD object block

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # readelem.sml
         # demonstrate how to read the number of blocks in a CAD object
         # and then loop through all the blocks and print out type of
         # each element
         clear()
         GetInputCAD(C)
         numBlocks = CADNumBlocks(C)
         print("number of blocks: ", numBlocks)
         # loop through all blocks
         for blk = 1 to numBlocks {
            numElements = CADNumElements(C, blk)
            printf("block: %3d number of elements: %5d \n\n", blk,
                   numElements)
         # loop through all elements
         for elem = 1 to numElements {
            # get the element type
            elem$ = CADElementType(C, blk, elem)
            printf("block: %3d element: %5d type: %s\n", blk, elem,
                   elem$)
            }
         }
         CloseCAD(C)
    


    CADReadArc(CADvar, block, element, xcenter, ycenter, radius, start, end)

    Reads an arc

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # arc.sml
         # demonstrate creating and reading an arc CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write an arc chord
         xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175
         CADWriteArc(C, 1, xin, yin, rin, startAngle, endAngle)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadArc(C, 1, lastelem, xCenter, yCenter,
                    radius, sAngle, eAngle)
         print("write and read CAD arc")
         print("element  xCenter  yCenter   radius   sAngle   eAngle")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem,
                xCenter, yCenter, radius, sAngle, eAngle)
         CloseCAD(C)
    


    CADReadArcChord(CADvar, block, element, xcenter, ycenter, radius, start, end)

    Reads an arc chord

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # arcchord.sml
         # demonstrate creating and reading an arc chord CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write an arc
         xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175
         CADWriteArcChord(C, 1, xin, yin, rin, startAngle, endAngle)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadArcChord(C, 1, lastelem, xCenter, yCenter,
                         radius, sAngle, eAngle)
         print("write and read CAD arc chord")
         print("element  xCenter  yCenter   radius   sAngle   eAngle")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem,
                xCenter, yCenter, radius, sAngle, eAngle)
         CloseCAD(C)
    


    CADReadArcWedge(CADvar, block, element, xcenter, ycenter, radius, start, end)

    Reads an arc wedge

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # arcwedge.sml
         # demonstrate creating and reading an arc wedge CAD element
         clear()
         #GetOutputCAD(C)  create a new file or open existing file
         # write an arc wedge
         xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175
         CADWriteArcWedge(C, 1, xin, yin, rin, startAngle, endAngle)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadArcWedge(C, 1, lastelem, xCenter, yCenter,
                         radius, sAngle, eAngle)
         print("write and read CAD arc wedge")
         print("element  xCenter  yCenter   radius   sAngle   eAngle")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem,
                xCenter, yCenter, radius, sAngle, eAngle)
         CloseCAD(C)
    


    CADReadBox(CADvar, block, element, lowerleftx, lowerlefty, upperrightx, upperrighty, rotation)

    Reads a polygon box

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # box.sml
         # demonstrate creating and reading a box CAD element
         # define array to hold element list
         array elemlist[10]
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         llX = 2000 # define lower left x, y
         llY = 2000
         urX = 2500 # define upper right x, y
         urY = 2050
         for rotation = 0 to 180 step 20 {
            CADWriteBox(C, 1, llX, llY, urX, urY, rotation)
            }
         # now read out the box values
         numElem = CADNumElements(C, 1)
         numBoxes = CADGetElementList(C, 1, "Box", elemlist )
         printf("number of elements: %4d number of boxes: %4d \n", numElem,
                numBoxes)
         print("box list:\n")
         for elem = 1 to numBoxes {
            CADReadBox(C, 1, elemlist[elem], llX, llY, urX, urY, rotation)
            printf("%4d %4d %6.2f %6.2f %6.2f %6.2f %6.2f\n",
                   elem, elemlist[elem], llX, llY, urX, urY, rotation)
            }
         CloseCAD(C)
    


    CADReadCircle(CADvar, block, element, xcenter, ycenter, radius)

    Reads a circle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # circle.sml
         # demonstrate creating and reading a circle CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write a circle
         xin = 100; yin = 200; rin = 50;
         CADWriteCircle(C, 1, xin, yin, rin)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our circle
         lastelem = CADNumElements(C, 1)
         # now read circle data for most recently added element
         CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius)
         print("write and read CAD circle")
         print("element  xCenter  yCenter   radius")
         printf("%7d %8.2f %8.2f %8.2f \n", lastelem,
                xCenter, yCenter, radius)
         CloseCAD(C)
    


    CADReadEllipse(CADvar, block, element, xcenter, ycenter, xsize, ysize, rotate)

    Reads an ellipse

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # ellipse.sml
         # demonstrate creating and reading an ellipse CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write an ellipse
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; rotation = 45
         CADWriteEllipse(C, 1, xin, yin, xSize, ySize, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our ellipse
         lastelem = CADNumElements(C, 1)
         # now read ellipse data for most recently added element
         CADReadEllipse(C, 1, lastelem, xCenter, yCenter,
                        xSize, ySize, rotation)
         print("write and read CAD ellipse")
         print("element  xCenter  yCenter    xSize    ySize rotation")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem,
                xCenter, yCenter, xSize, ySize, rotation)
         CloseCAD(C)
    


    CADReadEllipticalArc(CADvar, block, element, xcenter, ycenter, xsize, ysize, start, end, rotate)

    Reads an elliptical arc

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # earc.sml
         # demonstrate creating and reading an elliptical arc CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write an elliptical arc
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30;
         endAngle = 150; rotation = 45
         CADWriteEllipticalArc(C, 1, xin, yin, xSize, ySize,
                               startAngle, endAngle, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadEllipticalArc(C, 1, lastelem, xCenter, yCenter, xSize,
                              ySize, sAngle, eAngle, rotation)
         print("write and read CAD elliptical arc")
         a$ = "element  xCenter  yCenter    "
         b$ = "xSize    ySize   sAngle  eAngle rotation"
         print(a$ + b$)
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
                lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle,
                rotation)
         CloseCAD(C)
    


    CADReadEllipticalArcChord(CADvar, block, element, xcenter, ycenter, xsize, ysize, start, end, rotate)

    Reads an elliptical arc chord

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # echord.sml
         # demonstrate creating and reading an
         # elliptical arc chord CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write an elliptical arc chord
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30;
         endAngle = 150; rotation = 45
         CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize,
                                    startAngle, endAngle, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize,
                                   ySize, sAngle, eAngle, rotation)
         print("write and read CAD elliptical arc chord")
         a$ = "element  xCenter  yCenter    "
         b$ = "xSize    ySize   sAngle  eAngle rotation"
         print(a$ + b$)
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
         lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle,
         rotation)
         CloseCAD(C)
    


    CADReadEllipticalArcWedge(CADvar, block, element, xcenter, ycenter, xsize, ysize, start, end, rotate)

    Reads an elliptical arc wedge.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # ewedge.sml
         # demonstrate creating and reading an
         # elliptical arc wedge CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write an elliptical arc wedge
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30;
         endAngle = 150; rotation = 45
         CADWriteEllipticalArcWedge(C, 1, xin, yin, xSize, ySize,
                                    startAngle, endAngle, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadEllipticalArcWedge(C, 1, lastelem, xCenter, yCenter, xSize,
                                   ySize, sAngle, eAngle, rotation)
         print("write and read CAD elliptical arc wedge")
         a$ = "element  xCenter  yCenter    "
         b$ = "xSize    ySize   sAngle  eAngle rotation"
         print(a$ + b$)
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
                lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle,
                rotation)
         CloseCAD(C)
    


    CADReadLine(CADvar, block, element, xpoints, ypoints)

    Reads a line

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # line.sml
         # demonstrate creating and reading a line CAD element
         # draws an amplitude modulated sine wave
         array xPoints[1000]
         array yPoints[1000]
         GetOutputCAD(C)
         numberPoints = 250
         inc = .025
         for i = 1 to numberPoints {
            x = i * inc
            xPoints[i] = x
            yPoints[i] = sin(x) * cos(10 * x)
            }
         CADWriteLine(C, 1, numberPoints, xPoints, yPoints)
         # now read and print out the points
         numberPoints = CADReadLine(C, 1, 1, xPoints, yPoints)
         print("line point list:\n")
         for elem = 1 to numberPoints {
            printf("%4d %6.2 %6.2f\n", elem,
                   xPoints[elem], yPoints[elem])
            }
         CloseCAD(C)
    


    CADReadPoint(CADvar, block, element, xcoord, ycoord)

    Reads a single point

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # point.sml
         # demonstrate creating and reading a point CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write a point
         xin = 100; yin = 200
         CADWritePoint(C, 1, xin, yin)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our point
         lastelem = CADNumElements(C, 1)
         # now read point data for most recently added element
         CADReadPoint(C, 1, lastelem, xCenter, yCenter)
         print("write and read CAD point")
         print("element  xCenter  yCenter")
         printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter)
         CloseCAD(C)
    


    CADReadPoly(CADvar, block, element, xpoints, ypoints)

    Reads a polygon

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # poly.sml
         # demonstrate creating and reading a polygon CAD element
         array xPoints[1000]
         array yPoints[1000]
         clear()
         GetOutputCAD(C)
         # define the polygon (triangle)
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 50
         yPoints[3] = 100
         numberPoints = 3 # polygon will automatically close to last point
         CADWritePoly(C, 1, numberPoints, xPoints, yPoints)
         # now read and print out the points
         numberPoints = CADReadPoly( C, 1, 1, xPoints, yPoints)
         print("polygon point list:\n")
         for elem = 1 to numberPoints {
            printf("%4d %6.2f %6.2f\n", elem,
                   xPoints[elem], yPoints[elem])
            }
          CloseCAD(C)
    


    CADReadText(CADvar, block, element, basex1, basey1, basex2, basey2, textheight, rotation, xscale, shear)

    Reads a single line of text

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # text.sml
         # demonstrate creating and reading a text CAD element
         clear()
         format$ = "%7d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n"
         # create a new file or open existing file
         GetOutputCAD(C)
         # write some text
         baseX1 = 100
         baseY1 = 100
         baseX2 = 200
         baseY2 = 100
         height = 100
         rotation = 0
         xScale = 1.0
         shear = 0
         # since rotation = 0 we will use both basepoints
         text$ = "CAD text string 1"
         CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height,
                      rotation, xScale, shear)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our text
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2,
         baseY2, height, rotation, xScale, shear)
         print("write and read CAD text")
         print("element   baseX1   baseY1   baseX2   baseY2   height",
                 " rotation   xScale    shear")
         printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height,
                rotation, xScale, shear)
         print("Text: ", text$)
         # now use rotation and one base point
         baseX1 = 100
         baseY1 = 500
         baseX2 = 0 # don't care
         baseY2 = 0 # don't care
         height = 100
         rotation = 45
         xScale = 1.0
         shear = -40   angle text backwards
         text$ = "CAD text string 2 - rotated and sheared"
         CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2,
                      height, rotation, xScale, shear)
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2,
                             baseY2, height, rotation, xScale, shear)
         printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2,
                height, rotation, xScale, shear)
         print("Text: ", text$)
         CloseCAD(C)
    


    CADUnattachDBRecord(CADvar, block, elemnum, table, recnum)

    Attach a database record to a CAD element

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-May-2000
    Modify Date: none
    Available in SML for Windows: Yes


    CADWriteArc(CADvar, block, xcenter, ycenter, radius, start, end)

    Creates an arc

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # arc.sml
         # demonstrates creating and reading an arc CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write an arc
         xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175
         CADWriteArc(C, 1, xin, yin, rin, startAngle, endAngle)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadArc(C, 1, lastelem, xCenter, yCenter, radius, sAngle,
                    eAngle)
         print("write and read CAD arc")
         print("element  xCenter  yCenter   radius   sAngle   eAngle")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter,
                yCenter, radius, sAngle, eAngle)
         CloseCAD(C)
    


    CADWriteArcChord(CADvar, block, xcenter, ycenter, radius, start, end)

    Creates an arc chord

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # arcchord.sml
         # demonstrate creating and reading an arc chord CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write an arc
         xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175
         CADWriteArcChord(C, 1, xin, yin, rin, startAngle, endAngle)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadArcChord(C, 1, lastelem, xCenter, yCenter, radius, sAngle,
                         eAngle)
         print("write and read CAD arc chord")
         print("element  xCenter  yCenter   radius   sAngle   eAngle")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter,
                yCenter, radius, sAngle, eAngle)
         CloseCAD(C)
    


    CADWriteArcWedge(CADvar, block, xcenter, ycenter, radius, start, end)

    Creates an arc wedge

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # arcwedge.sml
         # demonstrate creating and reading an arc wedge CAD element
         clear()
         GetOutputCAD(C)  # create a new file or open existing file
         # write an arc
         xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175
         CADWriteArcWedge(C, 1, xin, yin, rin, startAngle, endAngle)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadArcWedge(C, 1, lastelem, xCenter, yCenter, radius,
                         sAngle, eAngle)
         print("write and read CAD arc wedge")
         print("element  xCenter  yCenter   radius   sAngle   eAngle")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter,
                yCenter, radius, sAngle, eAngle)
    


    CADWriteBox(CADvar, block, lowerleftx, lowerlefty, upperrightx, upperrighty, rotation)

    Creates a polygon from lower left and upper right corner points

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # box.sml
         # demonstrate creating and reading a box CAD element
         # define array to hold element list
         array elemlist[10]
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         llX = 2000 # define lower left x, y
         llY = 2000
         urX = 2500 # define upper right x, y
         urY = 2050
         for rotation = 0 to 180 step 20 {
            CADWriteBox(C, 1, llX, llY, urX, urY, rotation)
            }
         # now read out the box values
         numElem = CADNumElements(C, 1)
         numBoxes = CADGetElementList(C, 1, "Box", elemlist )
         printf("number of elements: %4d number of boxes: %4d \n",
                numElem, numBoxes)
         print("box list:\n")
         for elem = 1 to numBoxes {
            CADReadBox(C, 1, elemlist[elem], llX, llY, urX, urY, rotation)
            printf("%4d %4d %6.2f %6.2f %6.2f %6.2f %6.2f\n", elem,
                   elemlist[elem], llX, llY, urX, urY, rotation)
            }
         CloseCAD(C)
    


    CADWriteCircle(CADvar, block, xcenter, ycenter, radius)

    Creates a circle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # circle.sml
         # demonstrate creating and reading a circle CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write a circle
         xin = 100; yin = 200; rin = 50;
         CADWriteCircle(C, 1, xin, yin, rin)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our circle
         lastelem = CADNumElements(C, 1)
         # now read circle data for most recently added element
         CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius)
         print("write and read CAD circle")
         print("element  xCenter  yCenter   radius")
         printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter,
                radius)
        CloseCAD(C)
    


    CADWriteEllipse(CADvar, block, xcenter, ycenter, xsize, ysize, rotate)

    Creates an ellipse

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # ellipse.sml
         # demonstrate creating and reading an ellipse CAD element
         clear()
         GetOutputCAD(C) # create a new file or open existing file
         # write an ellipse
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; rotation = 45
         CADWriteEllipse(C, 1, xin, yin, xSize, ySize, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our ellipse
         lastelem = CADNumElements(C, 1)
         # now read ellipse data for most recently added element
         CADReadEllipse(C, 1, lastelem, xCenter, yCenter, xSize, ySize,
                        rotation)
         print("write and read CAD ellipse")
         print("element  xCenter  yCenter    xSize    ySize rotation")
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter,
                yCenter, xSize, ySize, rotation)
         CloseCAD(C)
    


    CADWriteEllipticalArc(CADvar, block, xcenter, ycenter, xsize, ysize, start, end, rotate)

    Creates an elliptical arc

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # earc.sml
         # demonstrate creating and reading an elliptical arc CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write a elliptical arc
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30;
         endAngle = 150; rotation = 45
         CADWriteEllipticalArc(C, 1, xin, yin, xSize, ySize, startAngle,
                               endAngle, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our ellipse
         lastelem = CADNumElements(C, 1)
         # now read ellipse data for most recently added element
         CADReadEllipticalArc(C, 1, lastelem, xCenter, yCenter, xSize,
                              ySize, sAngle, eAngle, rotation)
         print("write and read CAD elliptical arc")
         a$ = "element  xCenter  yCenter    "
         b$ = "xSize    ySize   sAngle  eAngle rotation"
         print(a$ + b$)
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
                lastelem, xCenter, yCenter, xSize, ySize, sAngle,
                eAngle, rotation)
         CloseCAD(C)
    


    CADWriteEllipticalArcChord(CADvar, block, xcenter, ycenter, xsize, ysize, start, end, rotate)

    Creates an elliptical arc chord

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # echord.sml
         # demonstrate creating and reading an
         # elliptical arc chord CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write an elliptical arc chord
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30;
         endAngle = 150; rotation = 45
         CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize,
                                    startAngle, endAngle, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our ellipse
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize,
                                   ySize, sAngle, eAngle, rotation)
         print("write and read CAD elliptical arc chord")
         a$ = "element  xCenter  yCenter    "
         b$ = "xSize    ySize   sAngle  eAngle rotation"
         print(a$ + b$)
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
                lastelem, xCenter, yCenter, xSize, ySize, sAngle,
                eAngle, rotation)
         CloseCAD(C)
    


    CADWriteEllipticalArcWedge(CADvar, block, xcenter, ycenter, xsize, ysize, start, end, rotate)

    Creates an elliptical arc wedge

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # ewedge.sml
         # demonstrate creating and reading an
         # elliptical arc wedge CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write an elliptical arc wedge
         xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30;
         endAngle = 150; rotation = 45
         CADWriteEllipticalArcWedge(C, 1, xin, yin, xSize, ySize,
                                    startAngle, endAngle, rotation)
         # the elements are always appended to end of block
         # so get number of elements - last element will be ours
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         CADReadEllipticalArcWedge(C, 1, lastelem, xCenter, yCenter, xSize,
                                   ySize, sAngle, eAngle, rotation)
         print("write and read CAD elliptical arc wedge")
         a$ = "element  xCenter  yCenter    "
         b$ = "xSize    ySize   sAngle  eAngle  rotation"
         print(a$ + b$)
         printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
                lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle,
                rotation)
         CloseCAD(C)
    


    CADWriteLine(CADvar, block, numPoints, xpoints, ypoints)

    Creates a line

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # line.sml
         # demonstrate creating and reading a line CAD element
         # draws an amplitude modulated sine wave
         array xPoints[1000]
         array yPoints[1000]
         GetOutputCAD(C)
         numberPoints = 250
         inc = .025
         for i = 1 to numberPoints {
            x = i * inc
            xPoints[i] = x
            yPoints[i] = sin(x) * cos(10 * x)
            }
         CADWriteLine(C, 1, numberPoints, xPoints, yPoints)
         # now print out the points
         numberPoints = CADReadLine(C, 1, 1, xPoints, yPoints)
         print("line point list:\n")
         for elem = 1 to numberPoints {
            printf("%4d %6.2 %6.2f\n", elem,
                   xPoints[elem], yPoints[elem])
            }
         CloseCAD(C)
    


    CADWritePoint(CADvar, block, xcoord, ycoord)

    Creates a single point

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # point.sml
         # demonstrate creating and reading a point CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write a point
         xin = 100; yin = 200
         CADWritePoint(C, 1, xin, yin)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our point
         lastelem = CADNumElements(C, 1)
         # now read point data for most recently added element
         CADReadPoint(C, 1, lastelem, xCenter, yCenter)
         print("write and read CAD point")
         print("element  xCenter  yCenter")
         printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter)
         CloseCAD(C)
    


    CADWritePoly(CADvar, block, numPoints, xpoints, ypoints)

    Creates a polygon

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # poly.sml
         # demonstrate creating and reading a polygon CAD element
         array xPoints[1000]
         array yPoints[1000]
         clear()
         GetOutputCAD(C)
         # define the polygon (triangle)
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 50
         yPoints[3] = 100
         numberPoints = 3 # polygon will automatically close to last point
         CADWritePoly(C, 1, numberPoints, xPoints, yPoints)
         # now print out the points
         numberPoints = CADReadPoly(C, 1, 1, xPoints, yPoints)
         print("polygon point list:\n")
         for elem = 1 to numberPoints {
            printf("%4d %6.2f %6.2f\n", elem,
                    Points[elem], yPoints[elem])
            }
         CloseCAD(C)
    


    CADWriteText(CADvar, block, text$, basex1, basey1, basex2, basey2, textheight, rotation, xscale, shear)

    Creates a single line of text

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # text.sml
         # demonstrate creating and reading a text CAD element
         clear()
         format$ = "%7d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n"
         # create a new file or open existing file
         GetOutputCAD(C)
         # write some text
         baseX1 = 100
         baseY1 = 100
         baseX2 = 200
         baseY2 = 100
         height = 100
         rotation = 0
         xScale = 1.0
         shear = 0
         # since rotation = 0 we will use both basepoints
         text$ = "CAD text string 1"
         CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2,
                      height, rotation, xScale, shear)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our text
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2,
                             baseY2, height, rotation, xScale, shear)
         print("write and read CAD text")
         print("element   baseX1   baseY1   baseX2   baseY2   height ",
               "rotation   xScale    shear")
         printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height,
                rotation, xScale, shear)
         print("Text: ", text$)
         # now use rotation and one base point
         baseX1 = 100
         baseY1 = 500
         baseX2 = 0 # don't care
         baseY2 = 0 # don't care
         height = 100
         rotation = 45
         xScale = 1.0
         shear = -40   # angle text backwards
         text$ = "CAD text string 2 - rotated and sheared"
         CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2,
                      height, rotation, xScale, shear)
         lastelem = CADNumElements(C, 1)
         # now read data for most recently added element
         text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2,
                             baseY2, height, rotation, xScale, shear)
         printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2,
                height, rotation, xScale, shear)
         print("Text: ", text$)
         CloseCAD(C)
    


    CloseCAD(CADvar)

    Closes a previously opened CAD object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputCAD(C)
         # or GetOutputCAD(C)
         # do something with CAD object C
         CloseCAD(C)
    


    CreateCAD(CADvar, filename$, objname$, desc$)

    Create a CAD object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-May-2001
    Modify Date: none
    Available in SML for Windows: Yes


    GetInputCAD(CADvar)

    Use a File/Object selection dialog to select an input CAD

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # read elem.sml
         # demonstrates how to read the number of blocks in a CAD object
         # and loop through all the blocks and print out type of each
         # element
         clear()
         GetInputCAD(C)
         numBlocks = CADNumBlocks(C)
         print("number of blocks: ", numBlocks)
         # loop through all blocks
         for blk = 1 to numBlocks {
            numElements = CADNumElements(C, blk)
            printf("block: %3d number of elements: %5d \n\n", blk,
                   numElements)
            # loop through all elements
            for elem = 1 to numElements {
               # get the element type
               elem$ = CADElementType(C, blk, elem)
               printf("block: %3d element: %5d type: %s\n", blk, elem,
                      elem$)
               }
            }
         CloseCAD(C)
    


    GetOutputCAD(CADvar)

    Opens a CAD object for reading or writing

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # circle.sml
         # demonstrate creating and reading a circle CAD element
         clear()
         # create a new file or open existing file
         GetOutputCAD(C)
         # write a circle
         xin = 100; yin = 200; rin = 50;
         CADWriteCircle(C, 1, xin, yin, rin)
         # the elements are always appended to end of block
         # so get number of elements - last element will be our circle
         lastelem = CADNumElements(C, 1)
         # now read cirle data for most recently added element
         CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius)
         print("write and read CAD circle")
         print("element  xCenter  yCenter   radius")
         printf("%7d %8.2f %8.2f %8.2f \n", lastelem,
                xCenter, yCenter, radius)
         CloseCAD(C)
    


    OpenCAD(CADvar, filename$, objname$)

    Open a CAD object given a filename and objectname

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-May-2001
    Modify Date: none
    Available in SML for Windows: Yes


    TIN functions (26)


    CloseTIN(TINvar)

    Close an open TIN object

    Parameters:

    Returns:

    Create Date: 05-Oct-2001
    Modify Date: none
    Available in SML for Windows: Yes


    GetInputTIN(TIN)

    Use a File/Object selection dialog to select an input TIN

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputTIN(Tin)
         # get the RVC file name
         str$ = GetObjectFileName(Tin)
         objNum = GetObjectNumber(Tin) # and object number
         clear()
         print("TIN Object Number: ", objNum, "RVC file Name: ", str$)
    


    GetOutputTIN(TIN, flag1$, flag2$)

    Use a File/Object selection dialog to select an output TIN

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetOutputTIN(Tin)
         # get the RVC file name
         str$ = GetObjectFileName(Tin)
         objNum = GetObjectNumber(Tin)
         clear()
         print("TIN Object Number: ", objNum, "RVC file Name: ", str$)
    


    TINAddNode(TIN, x, y, z)

    Add a node to a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # addnode.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # note that node must be inside existing hull
         # use TINCreateFromNodes() to make initial TIN
         # get the extents - use georef version if needed
         GetObjectExtents(Tout, xMin, yMin, xMax, yMax)
         print("xMin, yMin, xMax, yMax ", xMin, yMin, xMax, yMax)
         x = floor((xMin + xMax) / 2)
         y = floor((yMin + yMax) / 2)
         z = 100 # set to what makes sense
         TINAddNode(Tout, x, y, z)
         print("node added at x, y ", x, y)
    


    TINCreateFromNodes(TIN, numNodes, xpoints, ypoints, zpoints, zscale, zoffset, xytolerance)

    Create a new TIN object from a list of nodes

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # maketin.sml
         # declare arrays to hold node x, y, and z values
         array x[100], y[100], z[100]
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         zscale = 1
         zoffset = 0
         xytolerance = 1
         # create some node values
         numnodes = 0
         for yy = 0 to 4 {
            for xx = 0 to 4 {
               if ((xx % 2) == 0) {
                  offset = 0
                  }
               else {
                  offset = 10
                  }
               numnodes += 1
               x[numnodes] = xx * 20
               y[numnodes] = yy * 20 + offset
               z[numnodes] = yy * 5 + xx * 10
               }
            }
         # create the tin
         TINCreateFromNodes(Tout, numnodes, x, y, z,
                            zscale, zoffset, xytolerance)
    


    TINDeleteEdgeAndMakeHole(TIN, edge)

    Delete an edge from a TIN object and create a hole

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

        # edgehole.sml
        clear()
        GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
        # pick an edge less than or equal
        # to number of edges
        numedges = TINNumberEdges(Tout)
        edge = floor(numedges / 2)
        TINDeleteEdgeAndMakeHole(Tout, edge)
        print("edge deleted ", edge)
    


    TINDeleteNode(TIN, node)

    Delete a node from a TIN object without creating hole

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # delnode.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         TINDeleteNode(Tout, node)
         print("node deleted ", node)
    


    TINDeleteNodeAndMakeHole(TIN, node)

    Delete a node from a TIN object and create a hole

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # nodehole.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         TINDeleteNodeAndMakeHole(Tout, node)
    


    TINDeleteTriangleAndMakeHole(TIN, triangle)

    Delete a triangle from a TIN object and create a hole

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # trihole.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a triangle less than or equal
         # to number of triangle
         numtriangles = TINNumberTriangles(Tout)
         triangle = floor(numtriangles / 2)
         TINDeleteTriangleAndMakeHole(Tout, triangle)
         print("triangle deleted ", triangle)
    


    TINDeleteTrianglesInPolygon(TIN, numpoints, xpoints, ypoints)

    Delete TIN triangles inside a polygon

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of TINDeleteTrianglesInPolygon()
    


    TINElementInRegion(Rgnvar, TINvar, element, flag1$, flag2$)

    Tests a TIN element against a region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of TINElementInRegion()
          GetInputTIN(Tin1)
          GetInputRegion(Region1)
          # check triangle 1
          inRegion = TINElementInRegion(Region1, Tin1, 1, "triangle", "CompletelyInside")
          if (inRegion)
             print( "element ", elem, "is CompletelyInside\n")
    


    TINGetConnectedEdgeList(TIN, node, edgelist)

    Returns list of all edges connected to a given node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # edgelist.sml
         array edgelist[100]
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         numedges = TINGetConnectedEdgeList(Tout, node, edgelist)
         print("number of edges connected to node: ", node, " = ",
               numedges)
         for i = 1 to numedges {
            print(edgelist[i])
            }
    


    TINGetConnectedNodeList(TIN, node, nodelist)

    Returns list of all nodes connected to a given node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # nodelist.sml
         array nodelist[100]
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         numnodes = TINGetConnectedNodeList(Tout, node, nodelist)
         print("number of nodes connected to node: ", node, " = ",
               numnodes)
         for i = 1 to numnodes {
            print(nodelist[i])
            }
    


    TINGetEdgeExtents(TINvar, edge, x1, y1, x2, y2)

    Return x and y extents of a edge

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # edgeext.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick an edge less than or equal
         # to number of edges
         numnedges = TINNumberEdges(Tout)
         edge = floor(numnedges / 2)
         TINGetEdgeExtents(Tout, edge, x1, y1, x2, y2)
         print("node, x1, y1, x2, y2 ", edge, x1, y1, x2, y2)
    


    TINGetEdgeNodesAndTriangles(TINvar, edge, nodefrom, nodeto, lefttriangle, righttriangle)

    Returns nodes and left and right triangles for a given edge

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # nodetri.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick an edge less than or equal
         # to number of edges
         numedges = TINNumberEdges(Tout)
         edge = floor(numedges / 2)
         TINGetEdgeNodesAndTriangles(Tout, edge, nodefrom, nodeto,
                                     lefttriangle, righttriangle)
         temp$ = "edge, nodefrom, nodeto, lefttriangle, righttriangle "
         print(temp$, edge, nodefrom, nodeto, lefttriangle, righttriangle)
    


    TINGetNodeExtents(TINvar, node, xcoord, ycoord)

    Return x and y coordinates of a node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # nodeext.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         TINGetNodeExtents(Tout, node, xCoordinate, yCoordinate)
         print("node, x, y ", node, xCoordinate, yCoordinate)
    


    TINGetNodeZValue(TINvar, node)

    Returns z value for a node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # getz.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         zvalue = TINGetNodeZValue(Tout, node)
         print("node, zvalue ", node, zvalue)
    


    TINGetSurroundTriangleList(TIN, node, trianglelist)

    Get the list of triangles surrounding a TIN node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of TINGetSurroundTriangleList()
    


    TINGetTriangleExtents(TINvar, triangle, x1, y1, x2, y2)

    Return x and y extents of a triangle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # triext.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a triangle less than or equal
         # to number of triangle
         numtriangles = TINNumberTriangles(Tout)
         triangle = floor(numtriangles / 2)
         TINGetTriangleExtents(Tout, triangle, x1, y1, x2, y2)
         print("node, x1, y1, x2, y2 ", triangle, x1, y1, x2, y2)
    


    TINGetTriangleNodesAndEdges(TINvar, triangle, node1, node2, node3, edge12, edge23, edge31)

    Returns the nodes and edges that make up a given triangle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # nodeedge.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a triangle less than or equal
         # to number of triangles
         numtriangles = TINNumberTriangles(Tout)
         triangle = floor(numtriangles / 2)
         TINGetTriangleNodesAndEdges(Tout, triangle, node1, node2,
                                     node3, edge12, edge23, edge31)
         temp$ = "node, x1, y1triangle, node1, "
         temp$ = temp$ + "node2, node3, edge12, edge23, edge31 "
         print(temp$, triangle, node1, node2, node3, edge12, edge23,
               edge31)
    


    TINGetTrianglesInPolygon(TIN, numpoints, xpoints, ypoints, trianglelist)

    Get a list of TIN triangles in a polygon

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of TINGetTrianglesInPolygon()
    


    TINNumberEdges(TIN)

    Returns number of edges in a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # tininfo.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         numhulls = TINNumberHulls(Tout)
         numedges = TINNumberEdges(Tout)
         numnodes = TINNumberNodes(Tout)
         numtri = TINNumberTriangles(Tout)
         temp$ = "num hulls, nodes, edges, triangles"
         print(temp$, numhulls, numnodes, numedges, numtri)
    


    TINNumberHulls(TIN)

    Returns number of hulls in a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # tininfo.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         numhulls = TINNumberHulls(Tout)
         numedges = TINNumberEdges(Tout)
         numnodes = TINNumberNodes(Tout)
         numtri = TINNumberTriangles(Tout)
         temp$ = "num hulls, nodes, edges, triangles"
         print(temp$, numhulls, numnodes, numedges, numtri)
    


    TINNumberNodes(TIN)

    Returns number of nodes in a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # tininfo.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         numhulls = TINNumberHulls(Tout)
         numedges = TINNumberEdges(Tout)
         numnodes = TINNumberNodes(Tout)
         numtri = TINNumberTriangles(Tout)
         temp$ = "num hulls, nodes, edges, triangles"
         print(temp$, numhulls, numnodes, numedges, numtri)
    


    TINNumberTriangles(TIN)

    Returns number of triangles in a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # tininfo.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         numhulls = TINNumberHulls(Tout)
         numedges = TINNumberEdges(Tout)
         numnodes = TINNumberNodes(Tout)
         numtri = TINNumberTriangles(Tout)
         temp$ = "num hulls, nodes, edges, triangles"
         print(temp$, numhulls, numnodes, numedges, numtri)
    


    TINSetNodeZValue(TINvar, node, zvalue)

    Sets z value for a node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # setz.sml
         clear()
         GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes")
         # pick a node less than or equal
         # to number of nodes
         numnodes = TINNumberNodes(Tout)
         node = floor(numnodes / 2)
         zvalue = TINGetNodeZValue(Tout, node)
         print("original node, value ", node, zvalue)
         TINSetNodeZValue(Tout, node, 100)
         zvalue = TINGetNodeZValue(Tout, node)
         print("new node, value ", node, zvalue)
    


    Region functions (13)


    ClearRegion(RegionVar)

    Clear the specified region

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

    ClearRegion(reg);     #Clears the region
    


    CopyRegion(Region, georef)

    Copies a region and optionally changes its georeference.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of CopyRegion()
          fileName$ = "c:/tnt/win32/PntInRgn/regions.rvc"
          objectName$ = "Region1"
          objdesc$ = "created via CreateRegion()"
          OpenRegion(RegionIn, fileName$, objectName$)
          GetOutputRegion(RegionOut)
          # just copy the region
          RgnOutSame = CopyRegion(RegionIn)
          SaveRegion(RegionOut, fileName$, objectName$, objdesc$)
    


    CreateRegion(RegionVar, filename$, objname$, desc$)

    Create a Region without using a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of CreateRegion()
          fileName$ = "c:/tnt/win32/PntInRgn/regions.rvc"
          objectName$ = "Region1"
          objdesc$ = "created via CreateRegion()"
          CreateRegion(MyRgn, fileName$, objectName$, objdesc$);
    


    GetInputRegion(RegionVar)

    Popup dialog to select a Region object for input

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of GetInputRegion()
    


    GetOutputRegion(RegionVar)

    Open a Region for output via dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of GetOutputRegion()
          fileName$ = "c:/tnt/win32/PntInRgn/regions.rvc"
          objectName$ = "Region1"
          objdesc$ = "created via CreateRegion()"
          OpenRegion(RegionIn, fileName$, objectName$)
          GetOutputRegion(RegionOut)
          # just copy the region
          RgnOutSame = CopyRegion(RegionIn)
          SaveRegion(RegionOut, fileName$, objectName$, objdesc$)
    


    OpenRegion(RegionVar, filename$, objname$)

    Opens a region without using a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of OpenRegion()
    


    PointInRegion(from_x, from_y, RegionVar)

    Test if a point is in a Region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of PointInRegion()
          GetInputRegion(RgnIn)
          x = 335000
          y = 153000
          # point and region same goeref
          result = PointInRegion(x, y, RgnIn)
          print(x, y, result)
          georeflatlon = GeorefAlloc()
          GeorefGetParms(georeflatlon)
          longitude = 42.64
          latitude = -103.3 # west of P.M. is always negative
          # point and region different goeref
          result = PointInRegion(latitude, longitude, RgnIn, georeflatlon)
          printf("%3.4f %3.4f %2d", latitude, longitude, result)
          longitude = 42.63
          latitude = -103.3 # west of P.M. is always negative
          # point and region different goeref
          result = PointInRegion(latitude, longitude, RgnIn, georeflatlon)
          printf("%3.4f %3.4f %2d", latitude, longitude, result)
          GeorefFree(georeflatlon)
    


    RegionAND(RegionVar1, RegionVar2)

    Create a Region that is the intersection of two Regions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of RegionAND()
          GetInputRegion(Rgn1)
          GetInputRegion(Rgn2)
          GetOutputRegion(RgnAND)
          RgnAND = RegionAND(Rgn1, Rgn2)
    


    RegionOR(RegionVar1, RegionVar2)

    Create a Region that is the union of two Regions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of RegionOR()
          GetInputRegion(Rgn1)
          GetInputRegion(Rgn2)
          GetOutputRegion(RgnOR)
          RgnOR = RegionOR(Rgn1, Rgn2)
    


    RegionSubtract(RegionVar1, RegionVar2)

    Subtract a Region from a Region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of RegionSubtract()
          GetInputRegion(Rgn1)
          GetInputRegion(Rgn2)
          GetOutputRegion(RgnSub)
          RgnSub = RegionSubtract(Rgn1, Rgn2)
    


    RegionTrans(Object, transparm, invert)

    Convert a region using a transparm.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of RegionTrans()
    


    RegionXOR(RegionVar1, RegionVar2)

    Create a Region that is the exclusive or of two Regions.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of RegionXOR()
          GetInputRegion(Rgn1)
          GetInputRegion(Rgn2)
          GetOutputRegion(RgnXOR)
          RgnXOR = RegionXOR(Rgn1, Rgn2)
    


    SaveRegion(RegionVar, filename$, objname$, desc$)

    Saves a Region without using a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of SaveRegion()
          region RgnIn, RgnOut
          GetInputRegion(RgnIn)
          RgnOut = CopyRegion(RgnIn)
          SaveRegion(RgnOut, "c:/tnt/win32/pfarming/Save.rvc", "myregion", "created in SML");
    


    File functions (29)


    CopyFile(inputFile$, outputFile$, statusHandle)

    Copy a file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-Jun-1998
    Modify Date: 22-Jun-1998
    Available in SML for Windows: Yes

    Example:

           # Example of CopyFile()
           class StatusHandle statusHandle;
           # create and destroy default status dialog
           result = CopyFile("c:/tnt/win32/data/Cb_elev.rvc", "c:/tnt/win32/data/Cb_elev_copy.rvc");
           # don't display status - statusHandle is NULL
           result = CopyFile("c:/tnt/win32/data/Cb_elev.rvc",
                             "c:/tnt/win32/data/Cb_elev_copy.rvc", statusHandle);
           print(result);
    


    CreateDir(filename$)

    Create a directory

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Mar-2001
    Modify Date: none
    Available in SML for Windows: Yes


    CreateTempFileName()

    Create a temporary file name.

    Where:

    Details:

    Returns:

    Create Date: 08-Dec-2000
    Modify Date: none
    Available in SML for Windows: Yes


    DeleteFile(filename$)

    Delete a file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DeleteFile()
    


    fclose(file)

    Close a file previously opened with fopen()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # assume file already exists
         clear()
         f=fopen("c:/junk.txt", "r")
         # get next line of text from text file specified by fileNumber
         str$ = fgetline$(f) ; print(str$)
         fclose(f)
    


    feof(file)

    Detects end of file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         if (fexists("c:\temp.txt", "r")) then {
            handle = fopen("c:\temp.txt", "r")
            while (!feof(handle)){
               line$ = fgetline$(handle)
               # do something with line
               }
            fclose(handle)
            }
    


    fexists(filename$, mode$)

    Checks for existence and i/o mode of file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         if (fexists("c:\temp.txt", "r")) then
             print("c:\temp.txt exists")
    


    fgetline$(file)

    Get next line of text from a text file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # assume file already exists
         clear()
         f=fopen("c:junk.txt", "r")
         # get next line of text from text file specified by fileNumber
         str$ = fgetline$(fileNumber) ; print(str$)
         fclose(f)
    


    fgetnum(file)

    Get next number from text file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear();
    


    fopen(filename$, mode$, encoding$)

    Open text file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # assume file already exists
         clear();
         f=fopen("c:junk.txt", "w+");   # create a file
         fprint(f, "This is line 1.\nThis is line 2.");  # write to it
         fclose(f);   # close it
         f=fopen("c:junk.txt", "r");   # open the file for reading
         print(fgetline$(f));   # read and print two lines
         fclose(f);   # close it
    


    fprint(file, value, ...)

    Print unformated text or values to text file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear();  # assume file already exists
         # Open a file, then write to the file, then close it
         f=fopen("c:/junk.txt", "r+");
         fprint(f, "This is line 1\nThis is line2.", "More line 2");
         fclose(f);
         f=fopen("c:/junk.txt", "r");
         print(fgetline$(f));
         print(fgetline$(f));
         fclose(f);
    


    fprintf(file, format$, value, ...)

    Print formatted text or values to text file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         str1$="This is line ";
         str2$=" you see. ";
         str3$="This is line 2. ";
         number=1;
         # Create a file, then write to the file, then close it
         f=fopen("c:/junk.txt", "w+");
         fprintf(f, "%s%d%sn%s", str1$, number, str2$, str3$);
         fclose(f);
         f=fopen("c:/junk.txt", "r");
         print(fgetline$(f));
         print(fgetline$(f));
         fclose(f);
    


    fread(file, buffer, length)

    Read raw bytes a from a file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of fread()
    


    freadbyte(file)

    Read a byte from a file or port.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of freadbyte()
    


    freadstring(file, length)

    Read a string from a file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of freadstring()
    


    fwrite(file, buffer, length)

    Write unformated data to a file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of fwrite()
    


    fwritebyte(file, byte, ...)

    Write a byte to a file or port.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of fwritebyte()
    


    fwritestring(file, string$, length)

    Write a string to a file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of fwritestring()
    


    GetDirectory(default$, prompt$)

    Popup a dialog for selecting a directory

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GetDirectory()
    


    GetInputFileName(default$, prompt$, ext$)

    Popup dialog to select a file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetInputFileName()
    


    GetInputTextFile(defaultFilename$, prompt$, extension$, encoding$)

    Open or create a text file for input/output via dialog

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Aug-1998
    Modify Date: 01-Feb-2001
    Available in SML for Windows: Yes

    Example:

           # Example of GetInputTextFile()
           class FILE fIn;
           clear()
           fIn = GetInputTextFile("c:/default.txt", "Select text file for input", "txt");
           # read a line from the text file
           str$ = fgetline$(fIn)
           print(str$);
    


    GetOutputFileName(default$, prompt$, ext$)

    Popup dialog to select an output file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GetOutputFileName()
    


    GetOutputTextFile(defaultFilename$, prompt$, extension$, encoding$)

    Open a text file for output via dialog

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Aug-1998
    Modify Date: 01-Feb-2001
    Available in SML for Windows: Yes

    Example:

           # Example of GetOutputTextFile()
           class FILE fOut;
           clear()
           fOut = GetOutputTextFile("c:/default.txt", "Select text file for input", "txt");
           # write some lines to the text file
           fwritestring(fOut, "string1\n");
           fwritestring(fOut, "string2\n");
    


    PortAddCallback(callback, function, data)

    Used to register functions to call when data is available. Procedure will be passed two parameters, the port, and the value passed as the data parameter to PortAddCallback()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of PortAddCallback()
    


    PortClose(port)

    Close a port.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of PortClose()
    


    PortOpen(name$, type$)

    Open a port.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of PortOpen()
    


    RenameFile(oldname$, newname$)

    Rename a file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of RenameFile()
    


    ScriptResourceReadFull(filename$)

    Read a text file from a text subobject under the script or a file in the same directory

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Nov-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ScriptResourceReadFull()
    


    TextFileReadFull(filename$)

    Read an entire text file into a string (keep the size "reasonable)\"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Feb-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TextFileReadFull()
    


    Ini File functions (8)


    IniClose(handle)

    Close an ini file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of IniClose()
    


    IniOpenFile(filename$)

    Open an ini file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of IniOpenFile()
    


    IniOpenObject(filename$, objectname$)

    Open an RVC text object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of IniOpenObject()
    


    IniOpenScriptResource(objectname$)

    Open an INI file as a subobject of the script or file in same directory

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of IniOpenScriptResource()
    


    IniReadNumber(group$, field$, default, min, max)

    Read a number from an ini file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of IniReadNumber()
    


    IniReadString(group$, field$, default$)

    Read a string from an ini file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of IniReadString()
    


    IniWriteNumber(group$, field$, value)

    Write a number to an ini file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of IniWriteNumber()
    


    IniWriteString(group$, field$, value$)

    Write a string to an ini file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of IniWriteString()
    


    Movie functions (10)


    MovieAddFrame(movie, frame)

    Add frame to movie

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieExit(movie)

    Finalize movie handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieGetFileExt(movie)

    Get File Extension

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieInit()

    Initialize movie handle (returns handle)

    Where:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieSetFormat(movie, format$)

    set movie format

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieSetFrameHeight(movie, height)

    set movie frame height

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieSetFrameRate(movie, framerate$)

    set movie frame rate

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieSetFrameWidth(movie, width)

    set movie frame width

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieStart(movie, filename$)

    Start movie

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    MovieStop(movie)

    Stop movie

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 02-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    Import Export functions (9)


    ExportCAD(mieHandle, outputFile$, rvcFile$, objectName$)

    Export a CAD using class derived from MieCAD class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ExportCAD()
          class MieMIFCAD mifHandle;
          mifFile$ = "c:/SML_ExpCAD.mif";
          inputRVCFile$ = "c:/ImpExp.rvc";
          inputObjectName$ = "FOOTPRNT";
          mifHandle.TableType = "CAD";
          ExportCAD(mifHandle, mifFile$, inputRVCFile$, inputObjectName$);
    


    ExportDatabase(mieHandle, outputFile$, rvcFile$, objectName$, databaseType$, tableName$)

    Export a database

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 08-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ExportDatabase()
    


    ExportRaster(mieHandle, outputFile$, rvcFile$, objectName$)

    Export a Raster using class derived from MieRASTER class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ExportRaster()
          class MieTIFF tiffHandle;
          tiffFile$ = "c:/import/smlexp.tif";
          inputRVCFile$ = "c:/import/temp_imp.rvc";
          inputObjectName$ = "imptiff";
          # set optional parms
          tiffHandle.CompressionType = "NONE";
          tiffHandle.PlanarConfiguration = "Band sequential";
          ExportRaster(tiffHandle, tiffFile$, inputRVCFile$, inputObjectName$);
    


    ExportTIN(mieHandle, outputFile$, rvcFile$, objectName$)

    Export a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ExportTIN()
    


    ExportVector(mieHandle, outputFile$, rvcFile$, objectName$)

    Export a Vector using class derived from MieVECTOR class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ExportVector()
          class MieGRASSVECTOR vHandle;
          grassFile$ = "c:/SML_Exp.ddf";
          inputRVCFile$ = "c:/test.rvc";
          inputObjectName$ = "VECTORS";
          ExportVector(vHandle, grassFile$, inputRVCFile$, inputObjectName$);
    


    ImportCAD(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    Import a CAD using class derived from MieCAD class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ImportCAD()
          class MieMIF mifHandle;
          mifFile$ = "c:/contours.mif";
          destRVCFile$ = "c:/ImpExp.rvc";
          destObjectName$ = "impMIF";
          destObjectDesc$ = "imported via SML";
          mifHandle.TableType = "CAD"
          ImportCAD(mifHandle, mifFile$, destRVCFile$, destObjectName$, destObjectDesc$);
    


    ImportRaster(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    Import a Raster using class derived from MieRASTER class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Feb-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ImportRaster()
          class MieTIFF tiffHandle;
          tiffFile$ = "c:/import/m_ulu_tm.tif";
          rvcFile$ = "c:/import/temp_imp.rvc";
          objectName$ = "imptiff";
          objectDesc$ = "imported via SML";
          # set any optional parms
          tiffHandle.SwapRedBlue = 1;
          ImportRaster(tiffHandle, tiffFile$, rvcFile$, objectName$, objectDesc$);
    


    ImportTIN(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    Import a TIN object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ImportTIN()
    


    ImportVector(mieHandle, inputFilename$, rvcFile$, objectName$, objectDescription$)

    Import a Vector using class derived from MieVECTOR class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Mar-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of ImportVector()
          class MieMIFVector vHandle;
          mifFile$ = "c:/contours.mif";
          destRVCFile$ = "c:/test.rvc";
          destObjectName$ = "ImpVectMIFF";
          destObjectDesc$ = "imported via SML";
          # set vector parms
          vHandle.TableType = "Polygon";
          vHandle.ElementType = "Polygon";
          ImportVector(vHandle, mifFile$, destRVCFile$, destObjectName$, destObjectDesc$);
    


    Raster Morphological functions (7)


    MorphCompliment(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Morphological compliment

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of MorphCompliment()
    


    MorphCopy(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Morphological copy

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of MorphCopy()
    


    MorphDifference(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Morphological difference

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of MorphDifference()
    


    MorphDilation(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Enlarges shapes by expanding their boundaries, opposite of MorphErosion()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         The morphology functions are not fully implemented in this version
         of SML.  This information is for future reference only.
    


    MorphErosion(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Shrinks shapes by expanding their boundaries, opposite of MorphDilation()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         The morphology functions are not fully implemented in this version
         of SML.  This information is for future reference only.
    


    MorphIntersection(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Morphological intersection

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of MorphIntersection()
    


    MorphTest(Input, Output, element, rows, columns, upper_threshold, lower_threshold)

    Morphological test

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 21-Apr-1995
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of MorphTest()
    


    Raster Focal functions (12)


    FocalFilter(Raster, filter, lin, col, scale)

    filter raster with focal area - (alternate form) FocalFilter(Rvar, Rfilt [, clin, ccol])

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = NumLins(Rvar) ; columns = NumCols(Rvar)
         type$ = RastType(Rvar)
         GetOutputRaster(R1, lines, columns, type$)
         GetOutputRaster(R2, lines, columns, type$)
         array f[3,3]   # all values are 0
         f[2,2] = 1   # an identity filter
         CreateTempRaster(Rfilt, lines, columns, type$)
         Rfilt[2,2]=1   # identity filter
         R1=FocalFilter(Rvar, f, 3, 3)
         R2=FocalFilter(Rvar, Rfilt)
         # R1 and R2 are both identical to Rvar,having been filtered by
         # 0 0 0
         # 0 1 0
         # 0 0 0
         # with the filter focus at its center. By moving the 1
         # to any other place in the kernel, you can shift the
         # raster 1 pixel in the opposite direction
         CloseRaster(Rvar) ; CloseRaster(R1) ; CloseRaster(R2)
    


    FocalMajority(Rast, numlins, numcols, lin, col, sample_size)

    Most frequently occurring value in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find majority when including every element in Rast
         # that is in the focal area, assuming that the center
         # of the focal area will be used as the focus of Rvar.
         fm1 = FocalMajority(Rvar, lines, columns, ctrlin, ctrcol)
         # find majority when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalMajority(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalMax(Rast, numlins, numcols, lin, col, sample_size)

    Largest value in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find maximum when including every element in Rast
         # that is in the focal area, assuming that the center
         # of the focal area will be used as the focus of Rvar.
         fm1 = FocalMax(Rvar, lines, columns, ctrlin, ctrcol)
         # find maximum when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalMax(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
    


    FocalMean(Rast, numlins, numcols, lin, col, sample_size)

    Average of cell values in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find average when including every element in Rast
         # that is in the focal area, assuming that the center of the focal
         # area will be used as the focus of Rvar.
         fm1 = FocalMean(Rvar, lines, columns, ctrlin, ctrcol)
         # find average when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalMean(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
    


    FocalMedian(Rast, numlins, numcols, lin, col, sample_size)

    Median - (middle element of sorted list) of values in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find median when including every element in Rast that
         # is in the focal area, assuming that the center of the
         # focal area will be used as the focus of Rvar.
         fm1 = FocalMedian(Rvar, lines, columns, ctrlin, ctrcol)
         # find median when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalMedian(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalMin(Rast, numlins, numcols, lin, col, sample_size)

    Smallest value in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find minimum when including every element in Rast
         # that is in the focal area, assuming that the center
         # of the focal area will be used as the focus of Rvar.
         fm1 = FocalMin(Rvar, lines, columns, ctrlin, ctrcol)
         # find minimum when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalMin(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalMinority(Rast, numlins, numcols, lin, col, sample_size)

    Least frequently occurring cell value in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find minority when including every element in Rast
         # that is in the focal area, assuming that the center
         # of the focal area will be used as the focus of Rvar.
         fm1 = FocalMinority(Rvar, lines, columns, ctrlin, ctrcol)
         # find minority when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalMinority(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalSD(Rast, numlins, numcols, lin, col, sample_size)

    Standard deviation of values in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find Standard Deviation when including every element in Rast
         # that is in the focal area, assuming that the center # of the
         # focal area will be used as the focus of Rvar.
         fm1 = FocalSD(Rvar, lines, columns, ctrlin, ctrcol)
         # find Standard Deviation when including the first,
         # third, fifth, etc., elements in each row of Rvar that
         # are also in the focal area.
         fm2 = FocalSD(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalSlope(Raster, lin, col)

    Slope of elevation surface at focus of focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         ctrlin = 100 ; ctrcol = 100
         # find slope when including every element in Raster that
         # is in the focal area, assuming that the center of the
         # focal area will be used as the focus of Rvar.
         slope = FocalSlope(Rvar, ctrlin, ctrcol)
    


    FocalSum(Rast, numlins, numcols, lin, col, sample_size)

    Sum of values in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find SUM when including every element in Rast that is
         # in the focal area, assuming that the center of the
         # focal area will be used as the focus of Rvar.
         fm1 = FocalSum(Rvar, lines, columns, ctrlin, ctrcol)
         # find SUM when including the first, third, fifth, etc.
         # elements in each row of Rvar that are also in the focal area.
         fm2 = FocalSum(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalVariance(Rast, numlins, numcols, lin, col, sample_size)

    Statistical variance of cell values in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find variance when including every element in Rast
         # that is in the focal area, assuming that the center
         # of the focal area will be used as the focus of Rvar.
         fm1 = FocalVariance(Rvar, lines, columns, ctrlin, ctrcol)
         # find variance when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalVariance(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    FocalVariety(Rast, numlins, numcols, lin, col, sample_size)

    Number of different cell values in focal area

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)
         lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100
         # find variety when including every element in Rast
         # that is in the focal area, assuming that the center
         # of the focal area will be used as the focus of Rvar.
         fm1 = FocalVariety(Rvar, lines, columns, ctrlin, ctrcol)
         # find variety when including the first, third, fifth,
         # etc. elements in each row of Rvar that are also in
         # the focal area.
         fm2 = FocalVariety(Rvar, lines, columns, ctrlin, ctrcol, 2)
         print(fm1, fm2)
         CloseRaster(Rvar)
    


    Raster Global functions (6)


    GlobalMax(Raster)

    Largest value in raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         gmax=GlobalMax(R) ; print(gmax)
         CloseRaster(R)
    


    GlobalMean(Raster)

    Average of cell values in raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         gmax=GlobalMean(R) ; print(gmax)
         CloseRaster(R)
    


    GlobalMin(Raster)

    Smallest value in entire raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         gmax=GlobalMin(R) ; print(gmax)
         CloseRaster(R)
    


    GlobalSD(Raster)

    Standard deviation of values in raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         gmax=GlobalSD(R) ; print(gmax)
         CloseRaster(R)
    


    GlobalSum(Raster)

    Sum of values in raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         gmax=GlobalSum(R) ; print(gmax)
         CloseRaster(R)
    


    GlobalVariance(Raster)

    Statistical variance of cell values in raster object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(R)
         gmax=GlobalVariance(R) ; print(gmax)
         CloseRaster(R)
    


    Vector Toolkit functions (25)


    ClosestPointOnLine(Vector, linenumber, x, y, x return, y return)

    Find the closest point on a line to a given point.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Jul-1999
    Modify Date: none
    Available in SML for Windows: Yes


    VectorAddLabel(Vector, labeltext$, height, basex1, basey1, basex2, basey2, basez1, basez2)

    Add a label to a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array labelList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         label$ = "abcdEFG"
         height = 20
         x1 = 20
         y1 = 10
         x2 = 40
         y2 = 10
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         # add 4 labels
         for i = 1 to 4 {
            VectorAddLabel(V, label$, height, x1, y1, x2, y2)
            y1 += 25
            y2 += 25
            height /= 2
            }
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         VectorDeleteLabel(V, 1)
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         labelList[1] = 1
         labelList[2] = 2
         VectorDeleteLabels(V, labelList, 2)
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
    


    VectorAddLine(Vector, numPoints, xPoints, yPoints, zPoints)

    Adds a multiple vertex line to a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], lineList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points for our line
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 50
         yPoints[2] = 45
         xPoints[3] = 75
         yPoints[3] = 80
         xPoints[4] = 100
         yPoints[4] = 100
         # add 4 lines - each with four points
         for i = 1 to 4 {
            VectorAddLine(V, 4, xPoints, yPoints)
            # change the points to make a different line
            for j = 1 to 4 {
               xPoints[j] = xPoints[j] + 200
               yPoints[j] = yPoints[j] + 20
               }
            }
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
         VectorDeleteLine(V, 1)
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
         lineList[1] = 1
         lineList[2] = 2
         VectorDeleteLines(V, lineList, 2)
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
    


    VectorAddNode(Vector, x, y, searchDistance, z)

    Adds a node to a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], nodeList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points for our polygon box
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 70
         yPoints[2] = 70
         xPoints[3] = 90
         yPoints[3] = 100
         xPoints[4] = 130
         yPoints[4] = 120
         # create a line
         numberPoints = 4
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # create a second line
         numberPoints = 4
         for i = 1 to 5 {
            xPoints[i] = xPoints[i] + 200
            }
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # now add a some nodes to the first line
         x = 10
         y = 10
         searchDistance = 10
         for i = 1 to 4 {
            VectorAddNode(V, x, y, searchDistance)
            print("node added at x, y: ", x, y)
            x = x + 10
            y = y + 10
            }
         # now add a some nodes to the second line
         x = 210
         y = 10
         searchDistance = 10
         for i = 1 to 4 {
            VectorAddNode(V, x, y, searchDistance)
            print("node added at x, y: ", x, y)
            x = x + 10
            y = y + 10
            }
         # now delete a single node from the first line
         node1 = FindClosestNode(V, 10, 10)
         VectorDeleteNode(V, node1)
         print("node", node1, "at x, y", 10, 10, "will be deleted")
         # now delete multiple nodes from the first line
         x = 20
         y = 20
         searchDistance = 10
         for i = 1 to 3 {
            nodeList[i] = FindClosestNode(V, x, y)
            print("node", nodeList[i], "at x, y", x, y, "will be deleted")
            x = x + 10
            y = y + 10
            }
         numNodes = 3
         VectorDeleteNodes(V, nodeList, numNodes)
    


    VectorAddPoint(Vector, x, y, z)

    Adds a point to a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], pointList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         # add 4 points
         for i = 1 to 4 {
            VectorAddPoint(V, xPoints[i], yPoints[i])
            }
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         VectorDeletePoint(V, 1)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         pointList[1] = 1
         pointList[2] = 2
         VectorDeletePoints(V, pointList, 2)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
    


    VectorAddTwoPointLine(Vector, x1, y1, x2, y2, z1, z2)

    Adds a line with only two vertices to a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetOutputVector(V, "VectorToolkit")
         numLines = NumVectorLines(V)
         print("number of lines: ", numLines)
         # add two lines
         VectorAddTwoPointLine(V, 0, 0, 25, 25)
         VectorAddTwoPointLine(V, 50, 5, 100, 90)
         numLines = NumVectorLines(V)
         print("number of lines: ", numLines)
    


    VectorChangeLine(Vector, linenumber, numpoints, xPoints, yPoints, zPoints)

    Changes the vertices of an existing line in a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10]
         clear()
         # set up new points for line change
         xPoints[1] = 10
         yPoints[1] = 10
         xPoints[2] = 40
         yPoints[2] = 30
         xPoints[3] = 70
         yPoints[3] = 90
         xPoints[4] = 125
         yPoints[4] = 115
         numberPoints = 4
         GetOutputVector(V, "VectorToolkit")
         # add a line
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # now change a middle point
         xPoints[2] = 50
         yPoints[2] = 45
         lineNum = 1
         VectorChangeLine(V, lineNum, numberPoints, xPoints, yPoints)
    


    VectorChangePoint(Vector, point, newX, newY, newZ)

    Changes the location of an existing point in a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         # add some points
         VectorAddPoint(V, 10, 10)
         VectorAddPoint(V, 35, 35)
         VectorAddPoint(V, 50, 50)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         # now change the second point
         pointNum = 2
         VectorChangePoint(V, pointNum, 25, 25)
    


    VectorDeleteDangleLines(Vector, maxlength)

    Delete dangling lines.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of VectorDeleteDangleLines()
    


    VectorDeleteLabel(Vector, labelnumber)

    Deletes a label from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array labelList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         label$ = "abcdEFG"
         height = 20
         x1 = 20
         y1 = 10
         x2 = 40
         y2 = 10
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         # add 4 labels
         for i = 1 to 4 {
            VectorAddLabel(V, label$, height, x1, y1, x2, y2)
            y1 += 25
            y2 += 25
            height /= 2
            }
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         VectorDeleteLabel(V, 1)
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         labelList[1] = 1
         labelList[2] = 2
         VectorDeleteLabels(V, labelList, 2)
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
    


    VectorDeleteLabels(Vector, labellist, numlabels)

    Deletes multiple labels from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array labelList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         label$ = "abcdEFG"
         height = 20
         x1 = 20
         y1 = 10
         x2 = 40
         y2 = 10
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         # add 4 labels
         for i = 1 to 4 {
            VectorAddLabel(V, label$, height, x1, y1, x2, y2)
            y1 += 25
            y2 += 25
            height /= 2
            }
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         VectorDeleteLabel(V, 1)
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
         labelList[1] = 1
         labelList[2] = 2
         VectorDeleteLabels(V, labelList, 2)
         numLabels = NumVectorLabels(V)
         print("number of labels: ", numLabels)
    


    VectorDeleteLine(Vector, linenumber)

    Deletes a line from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], lineList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points for our line
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 50
         yPoints[2] = 45
         xPoints[3] = 75
         yPoints[3] = 80
         xPoints[4] = 100
         yPoints[4] = 100
         # add 4 lines - each with four points
         for i = 1 to 4 {
            VectorAddLine(V, 4, xPoints, yPoints)
            # change the points to make a different line
            for j = 1 to 4 {
               xPoints[j] = xPoints[j] + 200
               yPoints[j] = yPoints[j] + 20
               }
            }
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
         VectorDeleteLine(V, 1)
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
         lineList[1] = 1
         lineList[2] = 2
         VectorDeleteLines(V, lineList, 2)
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
    


    VectorDeleteLines(Vector, lineslist, numlines)

    Deletes mutiple lines from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], lineList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points for our line
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 50
         yPoints[2] = 45
         xPoints[3] = 75
         yPoints[3] = 80
         xPoints[4] = 100
         yPoints[4] = 100
         # add 4 lines - each with four points
         for i = 1 to 4 {
            VectorAddLine(V, 4, xPoints, yPoints)
            # change the points to make a different line
            for j = 1 to 4 {
               xPoints[j] = xPoints[j] + 200
               yPoints[j] = yPoints[j] + 20
               }
            }
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
         VectorDeleteLine(V, 1)
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
         lineList[1] = 1
         lineList[2] = 2
         VectorDeleteLines(V, lineList, 2)
         numLines = NumVectorLines(V)
         print("number of Lines: ", numLines)
    


    VectorDeleteNode(Vector, nodenumber, flag$)

    Deletes a node from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], nodeList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points for our polygon box
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 70
         yPoints[2] = 70
         xPoints[3] = 90
         yPoints[3] = 100
         xPoints[4] = 130
         yPoints[4] = 120
         # create a line
         numberPoints = 4
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # create a second line
         numberPoints = 4
         for i = 1 to 5 {
            xPoints[i] = xPoints[i] + 200
            }
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # now add a some nodes to the first line
         x = 10
         y = 10
         searchDistance = 10
         for i = 1 to 4 {
            VectorAddNode(V, x, y, searchDistance)
            print("node added at x, y: ", x, y)
            x = x + 10
            y = y + 10
            }
         # now add a some nodes to the second line
         x = 210
         y = 10
         searchDistance = 10
         for i = 1 to 4 {
            VectorAddNode(V, x, y, searchDistance)
            print("node added at x, y: ", x, y)
            x = x + 10
            y = y + 10
            }
         # now delete a single node from the first line
         node1 = FindClosestNode(V, 10, 10)
         VectorDeleteNode(V, node1)
         print("node", node1, "at x, y", 10, 10, "will be deleted")
         # now delete multiple nodes from the first line
         x = 20
         y = 20
         searchDistance = 10
         for i = 1 to 3 {
            nodeList[i] = FindClosestNode(V, x, y)
            print("node", nodeList[i], "at x, y", x, y, "will be deleted")
            x = x + 10
            y = y + 10
            }
         numNodes = 3
         VectorDeleteNodes(V, nodeList, numNodes)
    


    VectorDeleteNodes(Vector, nodelist, numnodes, flags)

    Deletes multiple nodes from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], nodeList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points for our polygon box
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 70
         yPoints[2] = 70
         xPoints[3] = 90
         yPoints[3] = 100
         xPoints[4] = 130
         yPoints[4] = 120
         # create a line
         numberPoints = 4
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # create a second line
         numberPoints = 4
         for i = 1 to 5 {
            xPoints[i] = xPoints[i] + 200
            }
         VectorAddLine(V, numberPoints, xPoints, yPoints)
         # now add a some nodes to the first line
         x = 10
         y = 10
         searchDistance = 10
         for i = 1 to 4 {
            VectorAddNode(V, x, y, searchDistance)
            print("node added at x, y: ", x, y)
            x = x + 10
            y = y + 10
            }
         # now add a some nodes to the second line
         x = 210
         y = 10
         searchDistance = 10
         for i = 1 to 4 {
            VectorAddNode(V, x, y, searchDistance)
            print("node added at x, y: ", x, y)
            x = x + 10
            y = y + 10
            }
         # now delete a single node from the first line
         node1 = FindClosestNode(V, 10, 10)
         VectorDeleteNode(V, node1)
         print("node", node1, "at x, y", 10, 10, "will be deleted")
         # now delete multiple nodes from the first line
         x = 20
         y = 20
         searchDistance = 10
         for i = 1 to 3 {
            nodeList[i] = FindClosestNode(V, x, y)
            print("node", nodeList[i], "at x, y", x, y, "will be deleted")
            x = x + 10
            y = y + 10
            }
         numNodes = 3
         VectorDeleteNodes(V, nodeList, numNodes)
    


    VectorDeletePoint(Vector, point)

    Deletes a point from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], pointList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         # add 4 points
         for i = 1 to 4 {
            VectorAddPoint(V, xPoints[i], yPoints[i])
            }
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         VectorDeletePoint(V, 1)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         pointList[1] = 1
         pointList[2] = 2
         VectorDeletePoints(V, pointList, 2)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
    


    VectorDeletePoints(Vector, pointlist, numpoints)

    Deletes multiple points from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], pointList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         #initialize some points
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         # add 4 points
         for i = 1 to 4 {
            VectorAddPoint(V, xPoints[i], yPoints[i])
            }
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         VectorDeletePoint(V, 1)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
         pointList[1] = 1
         pointList[2] = 2
         VectorDeletePoints(V, pointList, 2)
         numberPoints = NumVectorPoints(V)
         print("number of points: ", numberPoints)
    


    VectorDeletePoly(Vector, polynumber, flag$)

    Deletes a polygon from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], polyList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         # draw some boxes  - this will create polygons
         # all closed lines are converted to polygons
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         xPoints[5] = 0
         yPoints[5] = 0
         for i = 0 to 5 {
            VectorAddLine(V, 5, xPoints, yPoints)
            for j = 1 to 5 {
               xPoints[j] = xPoints[j] + 150
               }
            }
         numPolys = NumVectorPolys(V)
         print("number of polygons: ", numPolys)
         # now delete one polygon
         polyNum = 1
         VectorDeletePoly(V, polyNum)
         numPolys = NumVectorPolys(V)
         print("number of polygons: ", numPolys)
         # now delete multiple polygons
         polyList[1] = 1
         polyList[2] = 3
         polyCount = 2
         VectorDeletePolys(V, polyList, polyCount)
         numPolys = NumVectorPolys(V)
         print("number of polygons: ", numPolys)
    


    VectorDeletePolys(Vector, polylist, numpolys, flag$)

    Deletes multiple polygons from a vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10], polyList[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         # draw some boxes  - this will create polygons
         # all closed lines are converted to polygons
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         xPoints[5] = 0
         yPoints[5] = 0
         for i = 0 to 5 {
            VectorAddLine(V, 5, xPoints, yPoints)
            for j = 1 to 5 {
               xPoints[j] = xPoints[j] + 150
               }
            }
         numPolys = NumVectorPolys(V)
         print("number of polygons: ", numPolys)
         # now delete one polygon
         polyNum = 1
         VectorDeletePoly(V, polyNum)
         numPolys = NumVectorPolys(V)
         print("number of polygons: ", numPolys)
         # now delete multiple polygons
         polyList[1] = 1
         polyList[2] = 3
         polyCount = 2
         VectorDeletePolys(V, polyList, polyCount)
         numPolys = NumVectorPolys(V)
         print("number of polygons: ", numPolys)
    


    VectorDeleteStdAttributes(Vector)

    Delete standard attribute of a Vector object.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of VectorDeleteStdAttributes()
    


    VectorLineRayIntersection(Vector, x, y, angle, maxdist, intx, inty, projection)

    Find intersection of a ray and a Vector line.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of VectorLineRayIntersection()
    


    VectorSetFlags(Vector, flag$)

    Sets optional flags for a given vector object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         # not going to use labels so tell it not to create qtree
         VectorSetFlags(V, "NoLabelQTree")
         # draw some boxes  - this will create polygons
         # all closed lines are converted to polygons
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         xPoints[5] = 0
         yPoints[5] = 0
         VectorAddLine(V, 5, xPoints, yPoints)
         # now add some points
         for i = 1 to 4 {
            VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150)
            }
         numPolys = NumVectorPolys(V)
         numberPoints = NumVectorPoints(V)
         print("number of polygons, points: ", numPolys, numberPoints)
    


    VectorSetZValue(Vector, elementType$, elementNumber, zValue)

    Sets Z value for Vector element.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # example of VectorSetZValue()
          # 3D Vector creation and manipulation
          clear();
          # alternative - CreateVector() instead of GetOutputVector()
          # CreateVector(V, "c:/tnt/win32/projects/V3D/V3D.rvc", "V3d",
          # 						"3-d Vector from SML", "VectorToolkit,3DVector");
          GetOutputVector(V, "VectorToolkit,Network,3DVector");
          # add three points
          VectorAddPoint(V, 0, 0);
          VectorAddPoint(V, 25, 25);
          VectorAddPoint(V, 50, 50);
          # set z value for second point
          VectorSetZValue(V, "point", 2, 100);
          # add three lines
          VectorAddTwoPointLine(V, 100, 100, 150, 150, 50, 100);
          VectorAddTwoPointLine(V, 200, 200, 250, 250, 100, 150);
          VectorAddTwoPointLine(V, 300, 300, 350, 350, 150, 200);
          # set z value for second point
          # VectorSetZValue(V, "line", 2, 200);
          numLines = NumVectorLines(V);
          print("number of lines: ", numLines);
    


    VectorUpdateStdAttributes(Vector)

    Force update of standard attributes.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of VectorUpdateStdAttributes()
    


    VectorValidate(Vector)

    Validate vector topology

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         array xPoints[10], yPoints[10]
         clear()
         GetOutputVector(V, "VectorToolkit")
         # draw some boxes  - this will create polygons
         # all closed lines are converted to polygons
         xPoints[1] = 0
         yPoints[1] = 0
         xPoints[2] = 100
         yPoints[2] = 0
         xPoints[3] = 100
         yPoints[3] = 100
         xPoints[4] = 0
         yPoints[4] = 100
         xPoints[5] = 0
         yPoints[5] = 0
         VectorAddLine(V, 5, xPoints, yPoints)
         # now add some points
         for i = 1 to 4 {
            VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150)
            }
         numPolys = NumVectorPolys(V)
         numberPoints = NumVectorPoints(V)
         print("number of polygons, points: ", numPolys, numberPoints)
         print("validating vector")
         VectorValidate(V, "NoRemoveExNodes")
         print("done")
    


    Raster Classification functions (20)


    RasterClassifyAdaptiveResonance(numberClasses, maxIterations, initialMinDistance, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    Adaptive resonance (neural net) classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyAdaptiveResonance()
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          distON$ = "kMeanD";
          distDesc$ = "created in SML";
          numberClasses = 15;
          maxIterations = 10;
          initialMinDistance = 10;
          RasterClassifyAdaptiveResonance(numberClasses, maxIterations, initialMinDistance,
                                       classFN$, classON$, classDesc$,
                                       distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyAdaptiveResonanceWithMask(numberClasses, maxIterations, initialMinDistance, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    Adaptive resonance (neural net) classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifyAdaptiveResonanceWithMask()
         GetInputRaster(Mask);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         distON$ = "kMeanD";
         distDesc$ = "created in SML";
         numberClasses = 15;
         maxIterations = 10;
         initialMinDistance = 10;
         RasterClassifyAdaptiveResonanceWithMask(numberClasses, maxIterations, initialMinDistance,
                                      classFN$, classON$, classDesc$,
                                      distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyFuzzyCMean(numberClasses, maxIterations, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    Fuzzy C means classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyFuzzyCMean()
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
          distanceON$ = "distras";
          distanceDesc$ = "created in SML";
          numClasses = 15;
          maxIterations = 10;
          RasterClassifyFuzzyCMean(numClasses, maxIterations, classFN$, classON$, classDesc$,
                      distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyFuzzyCMeanWithMask(numberClasses, maxIterations, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    Fuzzy C means classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyFuzzyCMeanWithMask()
          GetInputRaster(Mask);
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
          distanceON$ = "distras";
          distanceDesc$ = "created in SML";
          numClasses = 15;
          maxIterations = 10;
          RasterClassifyFuzzyCMeanWithMask(numClasses, maxIterations, classFN$, classON$, classDesc$,
                      distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyISODATA(numberClasses, maxIterations, maxStdDeviaton, minDistanceToCombine, minClusterCells, minDistanceForChaining, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    ISODATA classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyISODATA()
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          distON$ = "ISODist";
          distDesc$ = "created in SML";
          numberClasses = 15;
          numberIterations = 10;
          maxStdDeviaton = 15;
          minDistanceToCombine = 3.2
          minClusterCells = 30
          minDistanceForChaining = 3.2
          RasterClassifyISODATA(numberClasses, numberIterations, maxStdDeviaton, minDistanceToCombine,
                                       minClusterCells, minDistanceForChaining, classFN$, classON$, classDesc$,
                                       distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyISODATAWithMask(numberClasses, maxIterations, maxStdDeviaton, minDistanceToCombine, minClusterCells, minDistanceForChaining, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    ISODATA classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifyISODATAWithMask()
         GetInputRaster(Mask);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         distON$ = "ISODist";
         distDesc$ = "created in SML";
         numberClasses = 15;
         numberIterations = 10;
         maxStdDeviaton = 15;
         minDistanceToCombine = 3.2
         minClusterCells = 30
         minDistanceForChaining = 3.2
         RasterClassifyISODATAWithMask(numberClasses, numberIterations, maxStdDeviaton, minDistanceToCombine,
                                      minClusterCells, minDistanceForChaining, classFN$, classON$, classDesc$,
                                      distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyKMeans(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    K means classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyKMeans()
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          distON$ = "kMeanD";
          distDesc$ = "created in SML";
          numClasses = 15;
          maxIterations = 10;
          initClusterMinDist = 10;
          maxMoveSteady = 5;
          minSteadyClusterPercent = 80;
          RasterClassifyKMeans(numClasses, maxIterations, initClusterMinDist, maxMoveSteady,
                                minSteadyClusterPercent, classFN$, classON$, classDesc$,
                                distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyKMeansWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    K means classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyKMeansWithMask()
          GetInputRaster(Mask);
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          distON$ = "distras";
          distDesc$ = "created in SML";
          numClasses = 15;
          maxIterations = 10;
          initClusterMinDist = 10;
          maxMoveSteady = 5;
          minSteadyClusterPercent = 80;
          RasterClassifyKMeansWithMask(numClasses, maxIterations, initClusterMinDist, maxMoveSteady,
                                       minSteadyClusterPercent, classFN$, classON$, classDesc$,
                                       distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyMaxLikelihood(minLikelihoodPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    Maximum likelihood classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyMaxLikelihood()
          GetInputRaster(Training);
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distanceFN$ = "";   # this function does not create a distance raster
          distanceON$ = "";
          distanceDesc$ = "";
          minLikelihoodPercent = 80;
          RasterClassifyMaxLikelihood(minLikelihoodPercent, classFN$, classON$, classDesc$,
                          distanceFN$, distanceON$, distanceDesc$,
                          "NoRedistribution", Training, R1, R2, R3);
    


    RasterClassifyMaxLikelihoodWithMask(minLikelihoodPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    Maximum likelihood classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifyMaxLikelihoodWithMask()
         GetInputRaster(Mask);
         GetInputRaster(Training);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "";   # this function does not create a distance raster
         classON$ = "";
         classDesc$ = "";
         distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
         distanceON$ = "distras";
         distanceDesc$ = "created in SML";
         minLikelihoodPercent = 80;
         RasterClassifyMaxLikelihoodWithMask(minLikelihoodPercent, classFN$, classON$, classDesc$,
                         distanceFN$, distanceON$, distanceDesc$,
                         "NoRedistribution", Mask, Training, R1, R2, R3);
    


    RasterClassifyMinAngle(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    Minimum distribution angle classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyMinAngle()
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          distON$ = "kMeanD";
          distDesc$ = "created in SML";
          numberClasses = 15;
          maxIterations = 10;
          maxMoveSteady = 10;
          minSteadyPercentage = 80;
          RasterClassifyMinAngle(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage,
                                 classFN$, classON$, classDesc$,
                                 distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifyMinAngleWithMask(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    Minimum distribution angle classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifyMinAngleWithMask()
         GetInputRaster(Mask);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         distON$ = "kMeanD";
         distDesc$ = "created in SML";
         numberClasses = 15;
         maxIterations = 10;
         maxMoveSteady = 10;
         minSteadyPercentage = 80;
         RasterClassifyMinAngleWithMask(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage,
                                classFN$, classON$, classDesc$,
                                distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyMinDistanceToMean(distanceMethod$, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    Minimum distance to mean classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyMinDistanceToMean()
          GetInputRaster(Training);
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          GetInputRaster(R4);
          GetInputRaster(R5);
          GetInputRaster(R6);
          classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
          distanceON$ = "distras"
          distanceDesc$ = "created in SML";
          RasterClassifyMinDistanceToMean("Euclidean", classFN$, classON$, classDesc$,
                          distanceFN$, distanceON$, distanceDesc$,
                          "NoRedistribution", Training, R1, R2, R3, R4, R5, R6);
    


    RasterClassifyMinDistanceToMeanWithMask(distanceMethod$, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    Minimum distance to mean classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifyMinDistanceToMeanWithMask()
         GetInputRaster(Mask);
         GetInputRaster(Training);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc";
         distanceON$ = "distras"
         distanceDesc$ = "created in SML";
         RasterClassifyMinDistanceToMeanWithMask("Euclidean", classFN$, classON$, classDesc$,
                         distanceFN$, distanceON$, distanceDesc$,
                         "NoRedistribution", Mask, Training, R1, R2, R3);
    


    RasterClassifySelfOrganization(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, InputRaster1, InputRaster2, ...)

    Self organization (neural net) classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifySelfOrganization()
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
          distON$ = "kMeanD";
          distDesc$ = "created in SML";
          numberClasses = 15;
          maxIterations = 10;
          initialMinDistance = 10;
          maxMoveSteady = 5;
          minSteadyPercentage = 80;
          RasterClassifySelfOrganization(numberClasses, maxIterations, initialMinDistance, maxMoveSteady,
                                       minSteadyPercentage, classFN$, classON$, classDesc$,
                                       distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
    


    RasterClassifySelfOrganizationWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, InputRaster1, InputRaster2, ...)

    Self organization (neural net) classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifySelfOrganizationWithMask()
         GetInputRaster(Mask);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc";
         distON$ = "kMeanD";
         distDesc$ = "created in SML";
         numberClasses = 15;
         maxIterations = 10;
         initialMinDistance = 10;
         maxMoveSteady = 5;
         minSteadyPercentage = 80;
         RasterClassifySelfOrganizationWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady,
                                      minSteadyPercentage, classFN$, classON$, classDesc$,
                                      distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
    


    RasterClassifyStepwiseLinear(classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    Stepwize linear classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifyStepwiseLinear()
          GetInputRaster(Training);
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distanceFN$ = "";   # this function does not create a distance raster
          distanceON$ = "";
          distanceDesc$ = "";
          numClasses = 15;
          maxIterations = 10;
          initClusterMinDist = 10;
          maxMoveSteady = 5;
          minSteadyClusterPercent = 80;
          RasterClassifyStepwiseLinear(classFN$, classON$, classDesc$,
                          distanceFN$, distanceON$, distanceDesc$,
                          "NoRedistribution", Training, R1, R2, R3);
    


    RasterClassifyStepwiseLinearWithMask(classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    Stepwize linear classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifyStepwiseLinearWithMask()
         GetInputRaster(Mask);
         GetInputRaster(Training);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distanceFN$ = "";   # this function does not create a distance raster
         distanceON$ = "";
         distanceDesc$ = "';
         numClasses = 15;
         maxIterations = 10;
         initClusterMinDist = 10;
         maxMoveSteady = 5;
         minSteadyClusterPercent = 80;
         RasterClassifyStepwiseLinearWithMask(classFN$, classON$, classDesc$,
                         distanceFN$, distanceON$, distanceDesc$,
                         "NoRedistribution", Mask, Training, R1, R2, R3);
    


    RasterClassifySuitsMaxRelative(standardDeviationMultiplier, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, TrainingRaster, InputRaster1, InputRaster2, ...)

    Suits' maximum relative classification without mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of RasterClassifySuitsMaxRelative()
          GetInputRaster(Training);
          GetInputRaster(R1);
          GetInputRaster(R2);
          GetInputRaster(R3);
          classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
          classON$ = "classras";
          classDesc$ = "created in SML";
          distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
          distanceON$ = "distras";
          distanceDesc$ = "created in SML";
          stdDevMultiplier = 2;
          RasterClassifySuitsMaxRelative(stdDevMultiplier, classFN$, classON$, classDesc$,
                          distanceFN$, distanceON$, distanceDesc$,
                          "NoRedistribution", Training, R1, R2, R3);
    


    RasterClassifySuitsMaxRelativeWithMask(standardDeviationMultiplier, classRasterFilename$, classRasterObjectname$, classRasterDescription$, distanceRasterFilename$, distanceRasterObjectname$, distanceRasterDescription$, redistribution$, MaskRaster, TrainingRaster, InputRaster1, InputRaster2, ...)

    Suits' maximum relative classification using mask raster

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 19-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of RasterClassifySuitsMaxRelativeWithMask()
         GetInputRaster(Mask);
         GetInputRaster(Training);
         GetInputRaster(R1);
         GetInputRaster(R2);
         GetInputRaster(R3);
         classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
         classON$ = "classras";
         classDesc$ = "created in SML";
         distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc";
         distanceON$ = "distras";
         distanceDesc$ = "created in SML";
         stdDevMultiplier = 2;
         RasterClassifySuitsMaxRelativeWithMask(stdDevMultiplier, classFN$, classON$, classDesc$,
                         distanceFN$, distanceON$, distanceDesc$,
                         "NoRedistribution", Mask, Training, R1, R2, R3);
    


    Console functions (10)


    beep()

    Sound a beep

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         for a = 1 to 100
         beep()
    


    CheckCancel()

    Forces the SML script to check the cancel button.

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CheckCancel()
    


    clear()

    Clear console

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Screen should be clear.")
    


    input(default, min, max)

    Prompt user for keyboard input of scalar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
     	  printf("Enter a number: ");
         a=input()
         print(a)   # prints the number entered or 0
     	  printf("Enter a number: ");
         a=input(2)
         print(a)   # prints the number entered or 2
    


    input$(default$)

    Capture string input from keyboard

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         print("Enter a number. ") ; a$=input$()
         print(StrToNum(a$))
    


    print(value, ...)

    Sends unformated output to console

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         str1$="This is line "
         str2$="you see."
         str3$="The next is\nline 3."
         number=1
         print(str1$, number, str2$)
         print(str3$)
    


    printf(format$, value, ...)

    Send formatted output to the console

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         format$="%s%d%s\n%s"
         str1$="This is line "
         str2$="you see."
         str3$="This is line 2"
         number = 1
         print(str1$, number, str2$, str3$)
         printf(format$, str1$, 1, str2$, str3$)
    


    PrintMatrixToConsole(matrix)

    Prints the matrix to the console.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 18-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of PrintMatrixToConsole()
    


    SetStatusBar(value, max)

    Displays as status bar at the bottom of the console window

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(Rin)   # get the input raster
         numColumns = NumCols(Rin)
         numLines = NumLins(Rin)
         stepSize = int(numLines / 10)
         status = 0   # set up to display status bar
         for r = 1 to numLines {
            for c = 1 to numColumns {
               # invert all values
               Rin[r,c] = 255 - Rin[r,c]
               }
            if (!int( r % stepSize)) {   # handle status bar code
               status = status + 10
               SetStatusBar(status, 100)
               SetStatusMessage("Calculating new raster values.")
               }
            }
         CloseRaster(Rin)
    


    SetStatusMessage(string$)

    Displays a message at the bottom of the console window

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputRaster(Rin)   # get the input raster
         numColumns = NumCols(Rin)
         numLines = NumLins(Rin)
         stepSize = int(numLines / 10)
         status = 0   # set up to display status bar
         for r = 1 to numLines {
            for c = 1 to numColumns {
               # invert all values
               Rin[r,c] = 255 - Rin[r,c]
               }
            if (!int( r % stepSize)) {   # handle status bar code
               status = status + 10
               SetStatusBar(status, 100)
               SetStatusMessage("Calculating new raster values.")
               }
            }
         CloseRaster(Rin)
    


    Drawing functions (43)


    ActivateGC(gc)

    Do subsequent drawing with a given graphics context

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ActivateGC()
    


    CreateGCForDrawingArea(drawingArea)

    Create a graphics context

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateGCForDrawingArea()
    


    DestroyGC(gc)

    Destroy a graphics context

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DestroyGC()
    


    DrawArc(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    Draw an arc

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawArc()
    


    DrawArcChord(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    Draw non-filled arc chord

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawArcChord()
    


    DrawArcWedge(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    Draw non-filled arc wedge

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawArcWedge()
    


    DrawCircle(x, y, radius)

    Draw a circle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawCircle()
    


    DrawEllipse(x, y, xradius, yradius, angle)

    Draw an ellipse

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawEllipse()
    


    DrawInterfaceText(string$, x, y)

    Draw text using the interface font

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-Sep-2000
    Modify Date: none
    Available in SML for Windows: Yes


    DrawLocalBegin(xcenter, ycenter, xscale, yscale, angle)

    Overide current coordinate transformation matrix to local one

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawLocalBegin()
    


    DrawLocalEnd()

    Restore coordinate transformation matrix to one before call to DrawLocalBegin()

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawLocalEnd()
    


    DrawPoint(x, y)

    Draw single point

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawPoint()
    


    DrawPolyLine(x_points, y_points, numPoints)

    Draw polyline

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawPolyLine()
    


    DrawRect(x, y, width, height, angle)

    Draw a rectangle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawRect()
    


    DrawRegion(region)

    Draw non-filled Region

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawRegion()
    


    DrawSetFillStyle(name$)

    Set fill style out of current style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawSetFillStyle()
    


    DrawSetLineStyle(name$)

    Set line style out of current style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawSetLineStyle()
    


    DrawSetPointStyle(name$)

    Set point style out of current style object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawSetPointStyle()
    


    DrawTextSetColors(foreground, background)

    Set the colors for text drawing

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawTextSetColors()
    


    DrawTextSetFont(fontname$)

    Set font for text drawing

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawTextSetFont()
    


    DrawTextSetHeight(height)

    Sets text height in coordinate units

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 14-Jan-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DrawTextSetHeight()
    


    DrawTextSetHeightPixels(height)

    Set text height

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawTextSetHeightPixels()
    


    DrawTextSimple(string$, x, y, angle)

    Draw a text string

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawTextSimple()
    


    DrawTo(x, y)

    Draw line from current pen position to a point

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawTo()
    


    DrawUseDefaultStyleObject()

    Reset style object to default

    Where:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawUseDefaultStyleObject()
    


    DrawUseStyleObject(filename$, objectname$)

    Change the style object used for subsequent calls to SetStyle() functions

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DrawUseStyleObject()
    


    FillArcChord(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    Fill an arc chord with the current fill style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillArcChord()
    


    FillArcWedge(x, y, xradius, yradius, startangle, sweepangle, rotangle)

    Fill an arc wedge with the current fill style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillArcWedge()
    


    FillCircle(x, y, radius)

    Fill a circle with the current fill style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillCircle()
    


    FillEllipse(x, y, xradius, yradius, angle)

    Fill an ellipse with the current fill style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillEllipse()
    


    FillPolyLine(x_points, y_points, numPoints)

    Draw filled polyline with current fill mode

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillPolyLine()
    


    FillRect(x, y, width, height, angle)

    Fill a rectangle with the current fill style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillRect()
    


    FillRegion(region)

    Fill a Region with the current fill style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of FillRegion()
    


    GetColorPixel(color)

    Return a pixel value given a color

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GetColorPixel()
    


    GetNamedColor(name$)

    Return a COLOR given a color name from rgb.txt

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GetNamedColor()
    


    GetNamedColorPixel(name$)

    Return a pixel value given a color name from rgb.txt

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GetNamedColorPixel()
    


    LineStyleSetPoints(x_points, y_points, numPoints)

    Draw a line with the current line style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LineStyleSetPoints()
    


    LineStyleSetRegion(region)

    Draws a Region with current line style

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LineStyleSetRegion()
    


    MoveTo(x, y)

    Move pen

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of MoveTo()
    


    SetColor(color)

    Set color by color structure

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of SetColor()
    


    SetColorName(color$)

    Set color by name

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of SetColorName()
    


    SetColorRGB(red, green, blue, range)

    Set color by red, green, blue values

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of SetColorRGB()
    


    SetLineWidth(width, units$)

    Set the drawing line width

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of SetLineWidth()
    


    Widget functions (43)


    AlignWidgets(widget1, widget2, ...)

    Used to make labels line up.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of AlignWidgets()
    


    CloseViewHistogram(histogram)

    Close a histogram

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CloseViewHistogram()
    


    CreateButtonRow(parent, item, ...)

    Create a button row

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Mar-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of CreateButtonRow()
    


    CreateDrawingArea(parent, height, width)

    Create a drawing area.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateDrawingArea()
    


    CreateForm(parent)

    Create a form

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CreateForm()
    


    CreateFormDialog(name$, parent)

    Create a form dialog to put widgets in.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

     # DIALOG1.SML
     # Sample script for Getting Started.
     # Creates and opens a simple dialog window.
     
     # Define parent widget for dialog window.
     class XmForm win1;
     
     # Procedure for closing window
     proc OnClose() {
     	DialogClose(win1);
     	DestroyWidget(win1);
     	}
     
     # Set up dialog window
     win1 = CreateFormDialog("Hello World");
     win1.MarginHeight = 5;
     win1.MarginWidth = 5;
     
     # Create label text for window
     class XmLabel winLabel;
     winLabel = CreateLabel(win1,"Sample Dialog Window");
     winLabel.TopWidget = win1;
     winLabel.LeftWidget = win1;
     winLabel.LeftOffset = 10;
     winLabel.RightWidget = win1;
     winLabel.RightOffset = 10;
     
     # Create Close button attached to label on
     # on top and to window margin on left and right
     class XmPushButton closeButton;
     closeButton = CreatePushButton(win1,"Close");
     closeButton.TopWidget = winLabel;
     closeButton.TopOffset = 5;
     closeButton.leftWidget = win1;
     closeButton.rightWidget = win1;
     closeButton.bottomWidget = win1;
     WidgetAddCallback(closeButton.ActivateCallback,OnClose);
     
     # Open dialog window and keep script active
     # until window is closed.
     DialogOpen(win1);
     DialogWaitForClose(win1);    # Example of CreateFormDialog()
    


    CreateFrame(parent)

    Create a frame around widgets.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateFrame()
    


    CreateHorizontalSeparator(parent)

    Create a horizontal line on a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateHorizontalSeparator()
    


    CreateHTMLWidget(parent)

    Create an HTML widget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Nov-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of CreateHTMLWidget()
    


    CreateIconButtonRow(parent, item, ...)

    Creates an icon button row

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Mar-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of CreateIconButtonRow()
    


    CreateIconLabel(parent, iconClass$, iconName$, toolTip$)

    Add an icon to a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateIconLabel()
    


    CreateIconPushButton(parent, iconClass$, iconName$, toolTip$)

    Add an icon pushbutton to a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateIconPushButton()
    


    CreateIconToggleButton(parent, iconClass$, iconName$, toolTip$)

    Add an icon toggle button to a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateIconToggleButton()
    


    CreateLabel(parent, name$)

    Create a label on a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of CreateLabel()
    


    CreateList(parent)

    Create an XmList widget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Aug-2000
    Modify Date: 10-Aug-2000
    Available in SML for Windows: No


    CreateMenuItem(name$, function, data)

    Create a menu item

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of CreateMenuItem()
    


    CreateModalFormDialog(name$, parent)

    Create a modal form dialog to put widgets in.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateModalFormDialog()
    


    CreateOptionMenu(parent, name$, item, ...)

    Create an option menu

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Jun-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of CreateOptionMenu()
    


    CreatePromptNum(parent, name$, width, places, default, min, max)

    Create a prompt for numeric value.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Mar-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreatePromptNum()
    


    CreatePromptStr(parent, name$, width, default$)

    Create a prompt for string value.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Mar-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreatePromptStr()
    


    CreatePushButton(parent, name$)

    Create a (text) pushbutton.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of CreatePushButton()
    


    CreatePushButtonItem(name$, function, data)

    Create a button item.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreatePushButtonItem()
    


    CreateRowColumn(parent, numColumns)

    Creates a row/column form

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of CreateRowColumn()
    


    CreateScrolledList(parent)

    Create an XmScrolledWindow and XmList widget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Aug-2000
    Modify Date: 10-Aug-2000
    Available in SML for Windows: No


    CreateScrolledWindow(parent, scrollingPolicy$)

    Creates a form with scroll bars

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of CreateScrolledWindow()
    


    CreateToggleButton(parent, name$)

    Create a (text) toggle button.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateToggleButton()
    


    CreateToggleButtonItem(name$, function, data)

    Create a toggle button item.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 16-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateToggleButtonItem()
    


    CreateToolTip(widget, string$)

    Add a tooltip to a drawing area.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateToolTip()
    


    CreateUnitOptionMenu(parent, name$, function, type, default)

    Create an option menu for selecting units

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Sep-2000
    Modify Date: none
    Available in SML for Windows: No


    CreateVerticalSeparator(parent)

    Create a vertical line on a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateVerticalSeparator()
    


    CreateViewHistogram(dialogname$, Raster, Region)

    Pop up a histogram of a Raster with an optional Region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of CreateViewHistogram()
    


    DestroyToolTip(tooltip)

    Destroy tooltip.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DestroyToolTip()
    


    DestroyWidget(widget)

    Destroy a widget.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of DestroyWidget()
    


    DialogClose(dialog)

    Close a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of DialogClose()
    


    DialogFullScreen(dialog)

    Sets dialog to full screen mode

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of DialogFullScreen()
    


    DialogOpen(dialog)

    Open a dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of DialogOpen()
    


    DialogToBottom(dialog)

    Moves dialog to bottom of visible windows

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 27-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of DialogToBottom()
    


    DialogToTop(dialog)

    Moves dialog to top of visible windows

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 27-Apr-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of DialogToTop()
    


    DialogWaitForClose(dialog)

    Wait for user to close given modal dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DialogWaitForClose()
    


    DialogWaitForOpen(dialog)

    Wait for a dialog to open

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-May-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of DialogWaitForOpen()
    


    SetPopupDialogParent(widget)

    Set the parent widget for popup dialogs

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 14-Aug-2000
    Modify Date: 14-Aug-2000
    Available in SML for Windows: No


    UpdateViewHistogram(histogram, Region)

    Force update of histogram to current Region.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of UpdateViewHistogram()
    


    WidgetAddCallback(callback, function, data)

    Register function to call when an action happens on a widget.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of WidgetAddCallback()
    


    Status functions (7)


    StatusContextCreate(handle)

    Create a status context from a status handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-May-1998
    Modify Date: 20-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of StatusContextCreate()
    


    StatusContextDestroy(status)

    Destroy a status context

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-May-1998
    Modify Date: 20-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of StatusContextDestroy()
    


    StatusDialogCreate(parent, delay)

    Create a status dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: 12-Oct-2000
    Available in SML for Windows: No

    Example:

         # Example of StatusDialogCreate()
    


    StatusDialogDestroy(handle)

    Destroy a status dialog.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Jan-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of StatusDialogDestroy()
    


    StatusSetBar(status, value, max)

    Set the value of a status bar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-May-1998
    Modify Date: 20-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of StatusSetBar()
    


    StatusSetDefaultHandle(handle)

    Set the "current" status line.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-May-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of StatusSetDefaultHandle()
    


    StatusSetMessage(status, string$)

    Set the text message for a status bar

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 20-May-1998
    Modify Date: 20-May-1998
    Available in SML for Windows: Yes

    Example:

           # Example of StatusSetMessage()
    


    Raster Watershed functions (50)


    WatershedClose(watershed)

    Close an open watershed handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedCompute(watershed, flags$)

    Computes different hydrological features depends on flags

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedComputeElements(watershed, xValues, yValues, number, flags$)

    Computes different hydrological elements as flow paths, basins, ridges depends on selected set of seed points and/or flags

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedConvertRegionToMask(watershed, filename$, objname$, operation)

    Convert region given by filename and objectname to mask according an operation

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedFillDepressions(watershed, depressions, number, flags$)

    Fills depressions in different ways depends on selected set of watersheds with depressions and/or flags

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetBasin(watershed)

    Get current basin value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetBranch(watershed)

    Get current branch value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetIDOfWatershedPolygonForVectorPolygon(watershed, index)

    Get watershed polygon ID in watershed system for given vector polygon element ID

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetInlet(watershed)

    Get current inlet value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetMask(watershed, filename$, objname$)

    Get mask as filename ans objname

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetNumberOfDoublePours(watershed)

    Get number of double pour points in watershed system

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetNumberOfObjects(watershed)

    Get number of output objects that were calculated

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetNumberOfPours(watershed)

    Get number of pour points in watershed system

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetNumberOfVectorPolygons(watershed)

    Get number of vector polygons in watershed system

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetNumberOfWatershedPolygons(watershed)

    Get number of watershed polygons in watershed system

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetNumberOfWatershedPolygonsWithDepression(watershed)

    Get number of watershed polygons with depression in watershed system

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetObject(watershed, output$, filename$, objname$)

    Get mask as filename ans objname

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 31-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetOutlet(watershed)

    Get current outlet value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetPour(watershed, index)

    Get pour object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetStatus(watershed)

    Get status of watershed process

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedGetWatershedPolygon(watershed, index)

    Get watershed polygon object

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedInit(filename$, objname$)

    Initialize watershed (returns handle)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedIsValleySeparated(watershed)

    Is valley set separated

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedMaskInverseValue(watershed)

    Inverse value for all cells in mask

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedMaskSetValue(watershed, value)

    Set value for all cells in mask

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonClose(watershedpolygon)

    Close an open watershed polygon handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetIDOfLowerPour(watershedpolygon, index)

    Get ID of lower pour point by index

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetIDOfUpperPour(watershedpolygon, index)

    Get ID of upper pour point by index

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetIDOfVectorPolygon(watershedpolygon, index)

    Get element ID of vector polygon by index

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetMaxZ(watershedpolygon)

    Get maximum z value inside watershed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetMinZ(watershedpolygon)

    Get minimum z value inside watershed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetNumberOfLowerPours(watershedpolygon)

    Get number of lower pours in watershed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetNumberOfUpperPours(watershedpolygon)

    Get number of upper pours in watershed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetNumberOfVectorPolygons(watershedpolygon)

    Get number of vector polygons in watershed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonGetZ(watershedpolygon)

    Get minimum z value on watershed boundary

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonHasDepression(watershedpolygon)

    Does watershed polygon have a depression

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPolygonIsValid(watershedpolygon)

    Is watershed polygon valid

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourClose(watershedpour)

    Close an open watershed pour handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourGetElementIDOfVectorPoint(watershedpour)

    Get element ID of vector point

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourGetLeftWatershed(watershedpour)

    Get left watershed ID

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourGetPoint(watershedpour)

    Get location of pour point as POINT3D in original DEM coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourGetRightWatershed(watershedpour)

    Get right watershed ID

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourGetType(watershedpour)

    Get type of pour

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedPourIsValid(watershedpour)

    Is pour valid

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedSetBasin(watershed, value)

    Set value as current basin value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedSetBranch(watershed, value)

    Set value as current branch value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedSetInlet(watershed, value)

    Set value as current inlet value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedSetMask(watershed, filename$, objname$)

    Set mask from extrnal bynary raster by filename ans objname

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedSetOutlet(watershed, value)

    Set value as current outlet value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    WatershedSetValleySeparation(watershed, value)

    Set valley separation by given value

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Aug-2000
    Modify Date: none
    Available in SML for Windows: Yes


    Frame functions (8)


    FrameCopy(srcFrame, dstFrame, srcX, srcY, srcW, srcH, dstX, dstY)

    Copy an image from source frame to destination frame

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameCopyFromView(frame, view, srcX, srcY, srcW, srcH, dstX, dstY)

    Copy an image from view to frame

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameCreate(width, height)

    Create frame by width and height (returns handle)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameCreateFromView(view)

    Create frame from view (returns handle)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameCreateGC(frame)

    Create a Graphics Context (GC) for a Frame class

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameDestroy(frame)

    Destroy an open frame handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameGetHeight(frame)

    Get frame height

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    FrameGetWidth(frame)

    Get frame width

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    Surface Fitting functions (8)


    SurfaceFitBidirectional(Vector, Raster, acrossLineMethod$, alongLineMethod$, directionType$, direction, selectLines$, valueLines$, RefRaster)

    Surface fit by Bidirectional method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitBidirectional()
          GetInputVector(V);
          georef = GetLastUsedGeorefObject(V);
          CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                    "Bidirectional", "SML Surface Modeling", 30, 30,
                    "16-bit unsigned", georef);
          acrossLineMethod$ = "Linear";
          alongLineMethod$ = "Linear";
          directionType$ = "Automatic";
          direction = 0.0;   # not used if Automatic mode
          selectLines$ = "";
          valueLines$ = "";
          SurfaceFitBidirectional(V, R, acrossLineMethod$, alongLineMethod$,
                directionType$, direction, selectLines$, valueLines$);
          CloseRaster(R);
          CloseVector(V);
    


    SurfaceFitInverseDistance(Vector, Raster, usePoints, useLines, searchMethod$, searchDistance, weightPower, selectPoints$, selectLines$, valuePoints$, valueLines$, RefRaster)

    Surface fit by inverse distance method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitInverseDistance()
          GetInputVector(V);
          georef = GetLastUsedGeorefObject(V);
          CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "InvDist", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          R = 0 # zero out the Raster
          usePoints = 1;
          useLines = 0;
          searchMethod$ = "Circle"
          searchDist = 40.0;
          weightPower = 2.0;
          selectPoints$ = "";
          selectLines$  = "";
          valuePoints$ = "";
          valueLines$ = "";
          SurfaceFitInverseDistance(V, R, usePoints, useLines,
                searchMethod$, searchDist, weightPower,
                selectPoints$, selectLines$, valuePoints$, valueLines$);
          CloseRaster(R);
          CloseVector(V);
    


    SurfaceFitMinimumCurvature(Vector, Raster, usePoints, useLines, searchMethod$, searchDistance, weightPower, tension, selectPoints$, selectLines$, valuePoints$, valueLines$, RefRaster)

    Surface fit by minimum curvature method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitMinimumCurvature()
          GetInputVector(V);
          georef = GetLastUsedGeorefObject(V);
          CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "MinCurve", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          R = 0 # zero out the Raster
          usePoints = 1;
          useLines = 0;
          searchMethod$ = "Circle"
          searchDist = 30.0;
          weightPower = 2.0;
          tension = 0.0;
          selectPoints$ = "";
          selectLines$  = "";
          valuePoints$ = "";
          valueLines$ = "";
          SurfaceFitMinimumCurvature(V, R, usePoints, useLines,
                searchMethod$, searchDist, weightPower, tension,
                selectPoints$, selectLines$, valuePoints$, valueLines$);
          CloseRaster(R);
          CloseVector(V);
    


    SurfaceFitPolynomial(Vector, Raster, usePoints, useLines, polynomialOrder, selectPoints$, selectLines$, valuePoints$, valueLines$, RefRaster)

    Surface fit by polynomial method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitPolynomial()
          GetInputVector(V);
          georef = GetLastUsedGeorefObject(V);
          CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "Poly", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          R = 0 # zero out the Raster
          polyOrder = 3;
          usePoints = 1;
          useLines = 0;
          selectPoints$ = "";
          selectLines$  = "";
          valuePoints$ = "";
          valueLines$ = "";
          SurfaceFitPolynomial(V, R, usePoints, useLines,  polyOrder,
                selectPoints$, selectLines$, valuePoints$, valueLines$);
          CloseRaster(R);
          CloseVector(V);
    


    SurfaceFitProfiles(Vector, Raster, usePoints, useLines, searchDistance, selectPoints$, selectLines$, valuePoints$, valueLines$, RefRaster)

    Surface fit by profiles method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitProfiles()
          GetInputVector(V);
          georef = GetLastUsedGeorefObject(V);
          CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "Profile", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          R = 0 # zero out the Raster
          searchDist = 130.0;
          usePoints = 0;
          useLines = 1;
          selectPoints$ = "";
          selectLines$  = "";
          valuePoints$ = "";
          valueLines$ = "";
          SurfaceFitProfiles(V, R, usePoints, useLines, searchDist,
                selectPoints$, selectLines$, valuePoints$, valueLines$);
          CloseRaster(R);
          CloseVector(V);
    


    SurfaceFitTINLinear(TIN, Raster, selectPoints$, valuePoints$, RefRaster)

    Surface fit TIN by linear method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitTINLinear()
          GetInputTIN(T);
          georef = GetLastUsedGeorefObject(T);
          CreateRasterFromObject(T, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "TINLinear", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          R = 0 # zero out the Raster
          SurfaceFitTINLinear(T, R);
          CloseRaster(R);
    


    SurfaceFitTINQuintic(TIN, Raster, selectPoints$, valuePoints$, RefRaster)

    Surface fit TIN by quintic method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitTINQuintic()
          GetInputTIN(T);
          georef = GetLastUsedGeorefObject(T);
          CreateRasterFromObject(T, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "TINQuintic", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          SurfaceFitTINQuintic(T, R);
          CloseRaster(R);
    


    SurfaceFitTriangulation(Vector, Raster, usePoints, useLines, tolerance, selectPoints$, selectLines$, valuePoints$, valueLines$, RefRaster)

    Surface fit by triangulation method

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1999
    Modify Date: 09-Mar-2000
    Available in SML for Windows: Yes

    Example:

          # Example of SurfaceFitTriangulation()
          GetInputVector(V);
          georef = GetLastUsedGeorefObject(V);
          CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc",
                   "Triangle", "SML Surface Modeling", 30, 30,
                   "16-bit unsigned", georef);
          R = 0 # zero out the Raster
          tolerance = 0.0;
          usePoints = 1;
          useLines = 0;
          selectPoints$ = "";
          selectLines$ = "";
          valuePoints$ = "";
          valueLines$ = "";
          SurfaceFitTriangulation(V, R, usePoints, useLines, tolerance,
                selectPoints$, selectLines$, valuePoints$, valueLines$);
          CloseRaster(R);
          CloseVector(V);
    


    Geodata Display View functions (27)


    ViewActivateTool(view, tool)

    Activate a given tool.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewActivateTool()
    


    ViewAddStandardTools(view)

    Add "standard" tools to a view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewAddStandardTools()
    


    ViewAddToolIcons(view, addscripts)

    Create icons for tools added.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewAddToolIcons()
    


    ViewDestroy(view)

    Destroy a view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewDestroy()
    


    ViewGetMapScale(view)

    Get the current map scale of a view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewGetMapScale()
    


    ViewGetTransLayerToScreen(view, layer, inverse)

    Get transformation from layer to screen.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewGetTransLayerToScreen()
    


    ViewGetTransLayerToView(view, layer, inverse)

    Get transformation from layer to screen.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewGetTransLayerToView()
    


    ViewGetTransMapToView(view, projection, inverse)

    Get the transparm to translate between a map projection and view coordinates

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ViewGetTransMapToView()
    


    ViewGetTransViewToScreen(view, inverse)

    Get transformation from view to screen.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewGetTransViewToScreen()
    


    ViewRedraw(view, noUpdateBetweenLayers)

    Redraw view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewRedraw()
    


    ViewRedrawDirect(view, drawflags$)

    Draw view direct with drawflags

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Apr-2001
    Modify Date: none
    Available in SML for Windows: Yes


    ViewRedrawFull(view)

    Redraw view (full).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewRedrawFull()
    


    ViewRedrawIfNeeded(view)

    Redraw a view (but only if it has changed since last redraw)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

          # Example of ViewRedrawIfNeeded()
    


    ViewSaveSnapshot(view, filename$, objname$, desc$)

    Save a snapshot of a view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewSaveSnapshot()
    


    ViewSetGPS(view, gps)

    Set the GPS source for a view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-Jul-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ViewSetGPS()
    


    ViewSetMapScale(view, mapscale)

    Set the mapscale for a view (for next redraw).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewSetMapScale()
    


    ViewSetMessage(view, msg$)

    Set message in status line at bottom of view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewSetMessage()
    


    ViewSetStatusBar(view, value, max)

    Set status bar at bottom of view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewSetStatusBar()
    


    ViewStatusBarClear(view)

    Clear the status bar.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewStatusBarClear()
    


    ViewTransPointLayerToView(view, layer, inPoint)

    Translate a point from layer coordinates to view coordinates.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewTransPointLayerToView()
    


    ViewTransPointViewToLayer(view, layer, inPoint)

    Translate a point from layer view to layer coordinates.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewTransPointViewToLayer()
    


    ViewZoom1X(view, redraw)

    Set view to 1X zoom and redraw.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewZoom1X()
    


    ViewZoomFull(view, redraw)

    Zoom to show full extents of view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Jun-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ViewZoomFull()
    


    ViewZoomIn(view, zoomfactor, redraw)

    Zoom in on view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewZoomIn()
    


    ViewZoomOut(view, zoomfactor, redraw)

    Zoom out on view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewZoomOut()
    


    ViewZoomToGroup(view, group, redraw)

    Zoom so that a given group fills the view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ViewZoomToGroup()
    


    ViewZoomToLayer(view, layer, redraw)

    Zoom so that a given layer fills the view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ViewZoomToLayer()
    


    Geodata Display Layout functions (8)


    LayoutCreate(name$, hardcopy)

    Create a display or hardcopy layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Jun-1998
    Modify Date: 20-Mar-2001
    Available in SML for Windows: Yes

    Example:

           # Example of LayoutCreate()
    


    LayoutCreateView(layout, form, name$, height, width)

    Create a view for a layout.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LayoutCreateView()
    


    LayoutDestroy(layout)

    Destroy a layout and all the groups in it

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayoutDestroy()
    


    LayoutGetGroupByName(layout, name$)

    Get a group pointer given group name.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LayoutGetGroupByName()
    


    LayoutPageSetupDialog(layout)

    Popup page setup dialog for a layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1999
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of LayoutPageSetupDialog()
    


    LayoutPrint(layout, setupDialog)

    Print a layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1999
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of LayoutPrint()
    


    LayoutRead(layout, filename$, objectname$)

    Read a saved display layout from a file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayoutRead()
    


    LayoutWrite(layout, filename$, objectname$, description$)

    Save a display layout to a file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayoutWrite()
    


    Geodata Display Group functions (14)


    DispCreate2DGroup(name$, layout)

    Create a 2d group on a display.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DispCreate2DGroup()
    


    GroupAttachHorizontal(group, groupPoint$, offset, anchor$, archorPoint$, refgroup)

    Set horizontal position of display group in layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupAttachHorizontal()
    


    GroupAttachVertical(group, groupPoint$, offset, anchor$, archorPoint$, refgroup)

    Set vertical position of display group in layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupAttachVertical()
    


    GroupCreate(name$, layout)

    Create a group

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of GroupCreate()
    


    GroupCreate3DView(group, form, name$, height, width, createflags$)

    Create a 3d view of a group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupCreate3DView()
    


    GroupCreateLayerManagerForm(parent, group)

    Create layer manager as a form, (not a dialog)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupCreateLayerManagerForm()
    


    GroupCreateView(group, form, name$, height, width, createflags$)

    Create a 2d view of a group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupCreateView()
    


    GroupDestroy(group)

    Destroy a group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupDestroy()
    


    GroupGetLayerByName(group, name$)

    Get a layer pointer given the layer name.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupGetLayerByName()
    


    GroupOpenLayerManagerWindow(parent, group)

    Create "layer manager" dialog

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupOpenLayerManagerWindow()
    


    GroupRead(group, filename$, objectname$)

    Read a saved display group from a file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupRead()
    


    GroupRemoveAllLayers(group)

    Remove all layers from a group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupRemoveAllLayers()
    


    GroupSetActiveLayer(group, layer)

    Set the active layer for a group

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 05-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupSetActiveLayer()
    


    GroupWrite(group, filename$, objectname$, description$)

    Save a display group to a file

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 11-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupWrite()
    


    Geodata Display functions (93)


    CADLayerGetObject(layer, CAD)

    Set a CAD variable to point to the CAD object from a CADLayer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CADLayerGetObject()
    


    CADLayerSetObject(layer, Object)

    Change the object used by a CAD layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of CADLayerSetObject()
    


    DispAddButtons(disp, button1$, button2$, ...)

    Adds custom buttons to a display

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle=DispOpen()
         DispSetName(handle, "Window1")
         DispAddButtons(handle, "Close")
         str$=DispWaitForButtonPress(handle)
         if (str$ == "Window1.Close")
         DispClose(handle)
    


    DispAddCallback(callback, function, data)

    Register function to call when an action happens on a view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DispAddCallback()
    


    DispAddRaster(disp, filename$, objectnum)

    Adds a raster layer to a display window

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         fileName$="/data/standard/cb_tm.rvc"
         obname$="TM_2"
         objectNumberber=ObjectNumber(fileName$, obname$, "raster")
         handle=DispOpen()
         DispAddRaster(handle, fileName$, objectNumber)
         DispRedraw(handle)
         CloseRaster(Rvar)
    


    DispAddRasterVar(disp, Raster)

    Same as DispAddRaster() except uses SML raster variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputRaster(Rvar)   # open a raster
         handle=DispOpen()
         DispAddRasterVar(handle, Rvar)
         DispRedraw(handle)
         CloseRaster(Rvar)
    


    DispAddStandardTools(disp)

    Add standard tools to a display, (zoom box, slide view, and measurement)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle=DispOpen()
         DispAddStandardTools(handle)   # adds the tools
    


    DispClose(disp)

    Closes the display associated with handle displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle=DispOpen()
         DispAddStandardTools(handle)   # adds the tools
         # do something with the display
         DispClose(handle)
         handle=0   # useful safety tip-always set display handles
                    # to zero after closing the display.
    


    DispGetMapScale(disp)

    Returns the current map scale of the display associated with displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle=DispOpen()
         DispQuickAddRaster(handle, Rvar)
         DispRedraw(handle)
         print(DispGetMapScale(handle))
         DispClose(handle)
    


    DispGetRasterFromLayer(Raster, layer, component)

    Get the raster used by a given layer.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DispGetRasterFromLayer()
    


    DispGetVectorFromLayer(Vector, layer)

    Get the vector used by a given layer.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DispGetVectorFromLayer()
    


    DispLastButtonPressed(disp)

    Returns the label of the last button that was pressed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle1=DispOpen()
         DispSetName(handle1, "Window1")
         DispAddButtons(handle1, "Close")
         str$=DispLastButtonPressed(handle1)
         # reset button so it can be used again
         DispResetButtons(handle1)
         if (str$ == "Close") then
             DispClose(handle1)
    


    DispOpen(xsize, ysize, x, y)

    Opens a display and returns a handle to the display

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         disp1=DispOpen() ; disp2=DispOpen()
         DispSetTitle(disp1, "Display 1")   # set the titles
         DispSetTitle(disp2, "Display 2")
    


    DispPanTo(disp, x, y, redraw)

    Pan to a given location.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear();
         OpenRaster(R, "c:/tnt/benchmarks/benchmrk.sml", "milogo24");
         mydisp = DispOpen(700,500);
         DispQuickAddRasterVar(mydisp, R);
         DispRedraw(mydisp);
         DispZoomIn(mydisp,4,1);
         DispPanTo(mydisp,.03,.03,1);
    


    DispQuickAddCAD(disp, filename$, objectnum)

    Adds a CAD layer to display window referenced by displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         fileName$="/data/standard/cb_tm.rvc"
         obname$="railroads"
         objectNumberber=ObjectNumber(fileName$, obname$, "CAD")
         handle=DispOpen()
         DispQuickAddCAD(handle, fileName$, objectNumber)
         DispRedraw(handle)
    


    DispQuickAddCADVar(disp, CADVar)

    Quick add a CAD object to a Disp window given a CAD variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Jul-2001
    Modify Date: none
    Available in SML for Windows: No


    DispQuickAddRaster(disp, filename$, objectnum)

    Adds a raster layer to display window referenced by displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         fileName$="/data/standard/cb_tm.rvc"
         obname$="TM_2"
         objectNumberber=ObjectNumber(fileName$, obname$, "raster")
         handle=DispOpen()
         DispQuickAddRaster(handle, fileName$, objectNumber)
         DispRedraw(handle)
    


    DispQuickAddRasterVar(disp, Raster)

    Same as DispQuickAddRaster() except uses SML raster variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         class Disp handle;
         clear();
         GetInputRaster(Rvar);   # open a raster
         handle=DispOpen();
         rLayer = DispQuickAddRasterVar(handle, Rvar);
         DispRedraw(handle);
    


    DispQuickAddTIN(disp, filename$, objectnum)

    Adds a TIN layer to display window referenced by displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         fileName$="/data/standard/cb_tm.rvc"
         obname$="TIN object"
         objectNumberber=ObjectNumber(fileName$, obname$, "raster")
         handle=DispOpen()
         DispQuickAddTIN(handle, fileName$, objectNumber)
         DispRedraw(handle)
    


    DispQuickAddTINVar(disp, TINVar)

    Quick add TIN object to a Disp window given a TIN variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Jul-2001
    Modify Date: none
    Available in SML for Windows: No


    DispQuickAddVector(disp, filename$, objectnum)

    Adds a vector layer to display window referenced by displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         fileName$="/data/standard/cb_tm.rvc"
         obname$="railroads"
         objectNumberber=ObjectNumber(fileName$, obname$, "raster")
         handle=DispOpen()
         DispQuickAddRaster(handle, fileName$, objectNumber)
         DispRedraw(handle)
    


    DispQuickAddVectorVar(disp, Vector)

    Same as DispQuickAddVector() except uses SML vector variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(Vvar)   # open a vector
         handle=DispOpen()
         DispQuickAddVector(handle, Vvar)
         DispRedraw(handle)
    


    DispRedraw(disp)

    Same as clicking "Redraw"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(Vvar)   # open a vector
         handle=DispOpen()
         DispQuickAddVector(handle, Vvar)
         DispRedraw(handle)
    


    DispRedrawFull(disp)

    Same as clicking "Full view"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(Vvar)   # open a vector
         handle=DispOpen()
         DispQuickAddVectorVar(handle, Vvar)
         DispRedrawFull(handle)
    


    DispRemoveAllLayers(disp)

    Removes all layers from display referenced by displayNumber

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         handle=DispOpen()
         GetInputVector(Vvar1)   # open a vector
         GetInputVector(Vvar1)   # open a second vector
         DispQuickAddVectorVar(handle, Vvar1)
         DispQuickAddVectorVar(handle, Vvar2)
         DispRedrawFull(handle)
         DispRemoveAllLayers(handle)
    


    DispResetButtons(disp)

    Forces system to "forget" last button pressed

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle1=DispOpen()
         DispSetName(handle1, "Window1")
         DispAddButtons(handle1, "Close")
         str$=DispWaitForButtonPress(handle1)
         # reset button so it can be used again
         DispResetButtons(handle1)
         if (str$ == "Close") then
             DispClose(handle1)
    


    DispSetBackgroundColor(disp, red, green, blue)

    Set the background color of a display

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Jul-1999
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of DispSetBackgroundColor()
    


    DispSetMapScale(disp, mapscale)

    Sets the map scale for a display

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle=DispOpen()
         DispSetMapScale(handle, 24000)   # sets map scale to 1:24,000
    


    DispSetMessage(disp, message$)

    Displays string in message area of display window

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         handle=DispOpen()
         DispSetMessage(handle, "This is a message")
    


    DispSetMinMaxIndexFromGroup(Raster, group, minMaxFlag$)

    Set Raster cells to layer index of Raster with largest/smallest cell value in a group

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of DispSetMinMaxIndexFromGroup()
           class disp handle;
     
           GetOutputRaster(Rout);
     
           GetInputRaster(R1);
           GetInputRaster(R2);
           GetInputRaster(R3);
     
           handle = DispOpen();
           DispQuickAddRasterVar(handle, R1);
           DispQuickAddRasterVar(handle, R2);
           DispQuickAddRasterVar(handle, R3);
           DispRedraw(handle1);
     
           DispCreateMaxRasterFromGroup(Rout, handle.Group, "Max");
    


    DispSetName(disp, name$)

    Sets the name of a display window

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle1=DispOpen() ; handle2=DispOpen()
         DispSetName(handle1, "Window1") ;
         DispSetName(handle1, "Window2")
         str$=DispWaitForButtonPress()
         DispSetMessage(handle, "Button press message is " + str$)
         DispClose(handle1) ; DispClose(handle2)
    


    DispSetStatusBar(disp, value, max)

    Set the status bar on a standalone display window.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DispSetStatusBar()
    


    DispSetTitle(disp, title$)

    Displays string in title area of display window

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         DispOpen(handle)
         DispSetTitle(handle, "My Custom Window")
    


    DispStatusBarClear(disp)

    Clear the status bar.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of DispStatusBarClear()
    


    DispWaitForButtonPress(disp)

    Suspend execution and wait until button event

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         handle=DispOpen()
         DispSetName(handle, "Window1")
         str$ = DispWaitForButtonPress(handle)
         DispResetButtons(handle)
         DispSetMessage(handle, "ButtonPressed = " + str$)
         DispClose(handle)
    


    DispZoom1X(disp, redraw)

    Same as clicking "Zoom 1X"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         GetInputVector(Rvar)   # open a raster
         handle=DispOpen()
         DispQuickAddRasterVar(handle, Rvar)
         DispZoom1X(handle)
    


    DispZoomIn(disp, zoomfactor, redraw)

    Same as clicking "Zoom In"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(Rvar)   # open a raster
         handle=DispOpen()
         DispQuickAddRasterVar(handle, Rvar)
         DispZoom1X(handle, true)   # sets current zoomFactor to one
         # zoom in to four pixels per raster cell, with redraw
         DispZoomIn(handle, 4, true)
         # zoom in to eight pixels per raster cell, with redraw
         DispZoomIn(handle)   # zoomFactor==2, redraw==true are implied
    


    DispZoomOut(disp, zoomfactor, redraw)

    Same as clicking "Zoom Out"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear()
         GetInputVector(Rvar)   # open a raster
         handle=DispOpen()
         DispQuickAddRasterVar(handle, Rvar)
         DispZoom1X(handle,true)   # sets current zoomFactor to one
         # zoom out to four pixels per raster cell, with redraw
         DispZoomOut(handle, 4, true)
         # zoom out to eight pixels per raster cell, with redraw
         DispZoomOut(handle)   # zoomFactor==2, redraw==true are implied
    


    DispZoomTo(disp, x, y, zoomfactor, redraw)

    Pan to a given location.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         clear();
         OpenRaster(R, "c:/tnt/benchmarks/benchmrk.sml", "milogo24");
         mydisp = DispOpen(700,500);
         DispQuickAddRasterVar(mydisp, R);
         DispRedraw(mydisp);
    


    GroupAddMapGridLayer(group, projection, xinterval, yinterval, units$, extentsProjection, extents)

    Add a MapGridLayer to a group

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Feb-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupAddMapGridLayer()
    


    GroupAddRaster(group, filename$, objectnum, isElevation)

    Add a raster to a group by name

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupAddRaster()
    


    GroupAddRasterVar(group, Raster, isElevation)

    Add a raster to a group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupAddRasterVar()
    


    GroupQuickAddCAD(group, filename$, objectnum)

    Quick add a CAD layer (prompt).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupQuickAddCAD()
    


    GroupQuickAddCADVar(group, CADVar)

    Quick add a CAD layer given a CAD variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Jun-2001
    Modify Date: none
    Available in SML for Windows: Yes


    GroupQuickAddDBPinmap(group, filename$, objectname$, tablename$, xfieldname$, yfieldname$)

    Add a database pinmap to a group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

         # Example of GroupQuickAddDBPinmap()
    


    GroupQuickAddRaster(group, filename$, objectnum, isElevation)

    Quick add a Raster layer (prompt).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupQuickAddRaster()
    


    GroupQuickAddRasterVar(group, Raster, isElevation)

    Quick add a Raster layer given SML variable.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupQuickAddRasterVar()
    


    GroupQuickAddRegionVar(group, Region)

    Quick add a region layer given a region variable"

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 15-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GroupQuickAddRegionVar()
    


    GroupQuickAddTIN(group, filename$, objectnum)

    Quick add a TIN layer (prompt).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupQuickAddTIN()
    


    GroupQuickAddTINVar(group, TINVar)

    Quick add a TIN layer given a TIN variable

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 07-Jun-2001
    Modify Date: none
    Available in SML for Windows: Yes


    GroupQuickAddVector(group, filename$, objectnum, isElevation)

    Quick add a Vector layer (prompt).

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupQuickAddVector()
    


    GroupQuickAddVectorVar(group, Vector)

    Quick add a Vector layer given SML variable.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of GroupQuickAddVectorVar()
    


    LayerDestroy(layer)

    Destroy a layer.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LayerDestroy()
    


    LayerHide(layer, view)

    Hide a layer.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LayerHide()
    


    LayerLower(layer)

    Lower a layer. Returns 1 if moved, 0 if already at bottom of group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Feb-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayerLower()
    


    LayerOpenControls(layer, view)

    Open layer controls.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LayerOpenControls()
    


    LayerRaise(layer)

    Raise a layer. Returns 1 if moved, 0 if already at top of group.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Feb-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayerRaise()
    


    LayerShow(layer, view)

    Show a layer.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of LayerShow()
    


    LayoutAddScaleBarLayer(layout, length, lengthUnits$, width, widthUnits$, majorDiv, minorDiv)

    Add a ScaleBarLayer to a layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Feb-1999
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayoutAddScaleBarLayer()
    


    LayoutAddTextLayer(layout)

    Add a text Layer to a layout

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of LayoutAddTextLayer()
    


    PinmapLayerFindClosest(layer, point, maxdist, distance)

    Find the element closest to a given point in a PinmapLayer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 12-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of PinmapLayerFindClosest()
    


    PinmapLayerGetFieldInfo(layer, tablename$, fieldname$)

    Gets field information for a pin map layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of PinmapLayerGetFieldInfo()
    


    PinmapLayerOpenDatabase(layer, mode$)

    Open a pinmap layer database

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of PinmapLayerOpenDatabase()
    


    PinmapLayerSetObject(layer, filename$, objectname$, tablename$, xfieldname$, yfieldname$)

    Change the object used by a pinmap layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of PinmapLayerSetObject()
    


    RasterLayerGetObject(layer, Raster, component)

    Set a raster variable to point to the raster object from a RasterLayer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of RasterLayerGetObject()
    


    RasterLayerSetObject(layer, Object, isElevation)

    Change the object used by a raster layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of RasterLayerSetObject()
    


    RegionLayerGetObject(layer, Region)

    Set a region variable to point to the region from a RegionLayer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of RegionLayerGetObject()
    


    RegionLayerSetObject(layer, Object)

    Change the object used by a region layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of RegionLayerSetObject()
    


    TINLayerGetObject(layer, TIN)

    Set a TIN variable to point to the TIN object from a TINLayer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TINLayerGetObject()
    


    TINLayerSetObject(layer, Object)

    Change the object used by a TIN layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of TINLayerSetObject()
    


    ToolAddCallback(callback, function, data)

    Register function to call for tool events

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ToolAddCallback()
    


    ToolSetGPS(tool, gps)

    Set the GPS source of a tool

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 28-Jul-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ToolSetGPS()
    


    VectorLayerGetObject(layer, Vector)

    Set a vector variable to point to the vector object from a VectorLayer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of VectorLayerGetObject()
    


    VectorLayerSetObject(layer, Object)

    Change the object used by a vector layer

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 26-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of VectorLayerSetObject()
    


    View3DAddSimpleControls(view)

    Add simple viewpoint controls to 3D view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Jul-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of View3DAddSimpleControls()
    


    View3DReadPosIni(view, inigroup$, inihandle)

    Read 3D view settings from ini file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of View3DReadPosIni()
    


    View3DWritePosIni(view, inigroup$, inihandle)

    Write 3D view settings to ini file.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of View3DWritePosIni()
    


    ViewCreate3DViewPosTool(view)

    Create a 3D view position tool on a view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewCreate3DViewPosTool()
    


    ViewCreateExamineRasterTool(view)

    Add Examine Raster tool icon to view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewCreateExamineRasterTool()
    


    ViewCreateHyperIndexTool(view)

    Add HyperIndex tool icon to view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewCreateHyperIndexTool()
    


    ViewCreateLineTool(view, name$, iconName$, iconGroup$)

    Add a line drawing tool to a view

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

    
    


    ViewCreateMeasureTool(view)

    Add Measurement tool icon to view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: 30-Oct-1998
    Available in SML for Windows: No

    Example:

         # Example of ViewCreateMeasureTool()
    


    ViewCreateMultiPolygonTool(view, name$, iconName$, iconGroup$)

    Add multiple polygon drawing tool icon to view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewCreateMultiPolygonTool()
    


    ViewCreatePointTool(view, name$, iconName$, iconGroup$)

    Create a point tool

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-May-1998
    Modify Date: 22-May-1998
    Available in SML for Windows: No

    Example:

           # Example of ViewCreatePointTool()
    


    ViewCreatePolygonTool(view, name$, iconName$, iconGroup$)

    Add polygon drawing tool icon to view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewCreatePolygonTool()
    


    ViewCreateRectangleTool(view, name$, iconName$, iconGroup$)

    Create a tool for selecting a rectangle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ViewCreateRectangleTool()
    


    ViewCreateSelectTool(view)

    Create a select tool on a view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 09-Apr-1998
    Modify Date: 30-Oct-1998
    Available in SML for Windows: No

    Example:

         # Example of ViewCreateSelectTool()
    


    ViewCreateSketchTool(view)

    Add sketch tool icon to view.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 03-Feb-1998
    Modify Date: 30-Oct-1998
    Available in SML for Windows: No

    Example:

         # Example of ViewCreateSketchTool()
    


    ViewCreateSlideViewTool(view)

    Create tool for sliding a view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Jun-1999
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ViewCreateSlideViewTool()
    


    ViewCreateToolBoxTool(view)

    Add the ToolBox tool for a view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 30-Oct-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ViewCreateToolBoxTool()
    


    ViewCreateZoomBoxTool(view)

    Create zoom box tool for a view

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-Jun-1999
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of ViewCreateZoomBoxTool()
    


    ViewDrawPinmapElement(view, layer, elemnum)

    Draws a single pinmap element

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 04-Aug-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of ViewDrawPinmapElement()
    


    ViewOpen3DControls(view)

    Open the 3D controls.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

         # Example of ViewOpen3DControls()
    


    GPS functions (9)


    GPSAddCallback(callback, function, data)

    Used to register functions to call for GPS actions

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 01-Dec-1997
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of GPSAddCallback()
    


    GPSClose(gPSPort)

    Close a GPS Port

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GPSClose()
    


    GPSGetSourceName(sourceNumber)

    Return the name of a GPS source given its number

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GPSGetSourceName()
    


    GPSNumSources()

    Return number of GPS sources configured

    Where:

    Details:

    Returns:

    Create Date: 29-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GPSNumSources()
    


    GPSOpen(source)

    Open a GPS port

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 29-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of GPSOpen()
    


    GPSPortClose(gPSPort)

    Obsolete - use GPSClose()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

        # example of GPSPortClose()
        # declare class variables
        class GPSPort gpsport;
        class GPSData gpsdata;
        # open the port
        gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
        gpsdata = GPSPortRead(gpsport);
        # close the port
        GPSPortClose(gpsport);
    


    GPSPortOpen(name$, protocol$, portParms$)

    Obsolete - use GPSOpen()

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 10-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

        # example of GPSPortOpen()
        # declare class variables
        class GPSPort gpsport;
        class GPSData gpsdata;
        # open the port
        gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
        gpsdata = GPSPortRead(gpsport);
        # close the port
        GPSPortClose(gpsport);
    


    GPSPortRead(gPSPort, lastRead)

    Read data from a GPS port

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 13-Apr-1998
    Modify Date: 18-Jun-1998
    Available in SML for Windows: Yes

    Example:

        # example of GPSPortRead()
        # declare class variables
        class GPSPort gpsport;
        class GPSData gpsdata;
        clear()
        # open the port
        gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:");
        print(gpsport.protocol, gpsport.name, gpsport.portparm);
        while (1) { # now read data
           print(gpsport.protocol, gpsport.name, gpsport.portparm, "\n");
           gpsdata = GPSPortRead(gpsport);
           print(gpsdata.source);
     
           if (gpsdata.positionXYIsValid)
              print("x y", gpsdata.position.x, gpsdata.position.y);
     
           if (gpsdata.positionZIsValid)
              print("z  ", gpsdata.position.z);
           if (gpsdata.velocityXYIsValid)
              print("vx vy ", gpsdata.velocity.x, gpsdata.velocity.y);
           if (gpsdata.velocityZIsValid)
              print("vz    ", gpsdata.velocity.z);
           if (gpsdata.headingIsValid)
              print("heading", gpsdata.heading);
           if (gpsdata.speedIsValid)
              print("speed", gpsdata.speed);
           if (gpsdata.numberSatellitesIsValid)
              print("number of satellites", gpsdata.numberOfSatellites);
     
           printf("\n\n");
           sleep(1);
           clear();
           }
        # close the port
        GPSPortClose(gpsport);
    


    GPSSourceManagerOpen()

    Popup the GPS Source Manager dialog

    Where:

    Details:

    Returns:

    Create Date: 19-Nov-1998
    Modify Date: none
    Available in SML for Windows: No

    Example:

           # Example of GPSSourceManagerOpen()
    


    Vector Network functions (96)


    NetworkAllocatedCenterGet(allocationHandle, position)

    Get allocated center node from postion

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAllocationGet()
    


    NetworkAllocatedCenterGetAverageImpedance(allocationHandle, position)

    Get Allocated center average impedance

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetAverageImpedance()
    


    NetworkAllocatedCenterGetCapacity(allocationHandle, position)

    Get Allocated center capacity

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetCapacity()
    


    NetworkAllocatedCenterGetColor(allocationHandle, position, red, green, blue)

    Get allocated center color

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAllocationGetColor()
    


    NetworkAllocatedCenterGetDemand(allocationHandle, position)

    Get Allocated center demand

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetDemand()
    


    NetworkAllocatedCenterGetImpedanceDelay(allocationHandle, position)

    Get Allocated center impedance delay

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetImpedanceDelay()
    


    NetworkAllocatedCenterGetImpedanceLimit(allocationHandle, position)

    Get Allocated center impedance limit

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetImpedanceLimit()
    


    NetworkAllocatedCenterGetMaximumImpedance(allocationHandle, position)

    Get Allocated center maximum impedance

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetMaximumImpedance()
    


    NetworkAllocatedCenterGetNumber(allocationHandle)

    Get number of allocated centers

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAllocationGetNumberAllocations()
    


    NetworkAllocatedCenterGetNumberLines(allocationHandle, position)

    Get number of lines for an allocated center

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 06-Oct- 199
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedCenterGetNumberLines()
    


    NetworkAllocatedCenterGetPosition(allocationHandle, line)

    Get allocated center position given a node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAllocationGetPosition()
    


    NetworkAllocatedLineGetNumber(allocationHandle)

    Get number of allocated lines

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedLineGetNumber()
    


    NetworkAllocatedLineGetPosition(allocationHandle, node)

    Get allocated line position

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocatedLineGetPosition()
    


    NetworkAllocationClose(allocationHandle)

    Close an open allocation handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAllocationClose()
    


    NetworkAllocationGetReport(allocationHandle)

    Get a text report from an allocation handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocationGetReport()
    


    NetworkAllocationGetResultPositionList(allocationHandle, positionList)

    Get allocation position list

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAllocationGetResultPositionList()
    


    NetworkAllocationGetType(allocationHandle)

    Get allocation type (1 = ToFrom, 0 = FromTo)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocationGetType()
    


    NetworkAllocationRestoreCenter(allocationHandle)

    Recover a stop handle from a route handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkAllocationRestoreCenter()
    


    NetworkAngleApply(network)

    Apply a network angle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAngleApply()
    


    NetworkAngleGetImpedance(network, angle)

    Get impedance for an angle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAngleGetImpedance()
    


    NetworkAngleSetImpedance(network, angle, impedance)

    Set impedance for an angle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkAngleSetImpedance()
    


    NetworkCalculateMultiRoute(network, source, destinations, number, multiRouteHandle)

    Calculate a multiroute from source node to destination nodes

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jan-2001
    Modify Date: none
    Available in SML for Windows: Yes


    NetworkCenterAddCenter(center, node)

    Add a center at a node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterAddCenter()
    


    NetworkCenterCalculateAllocationIn(centerHandle)

    Calculate allocation in

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterCalculateAllocationIn()
    


    NetworkCenterCalculateAllocationOut(centerHandle)

    Calculate allocation out

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterCalculateAllocationOut()
    


    NetworkCenterCloneHandle(centerHandle)

    Duplicate a center handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterCloneHandle()
    


    NetworkCenterClose(centerHandle)

    Close an open center handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterClose()
    


    NetworkCenterDeleteAllCenters(centerHandle)

    Delete all centers

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterDeleteAllCenters()
    


    NetworkCenterDeleteCenters(centerHandle, centerList, number)

    Delete specific centers

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterDeleteCenters()
    


    NetworkCenterGet(centerHandle, position)

    Get center node given position

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGet()
    


    NetworkCenterGetCapacity(centerHandle, position)

    Get center capacity

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetCapacity()
    


    NetworkCenterGetCentersList(centerHandle, centerList)

    Get list of centers

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetCentersList()
    


    NetworkCenterGetColor(centerHandle, position, red, green, blue)

    Get center color

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetColor()
    


    NetworkCenterGetImpedanceDelay(centerHandle, position)

    Get center impedance delay

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetImpedanceDelay()
    


    NetworkCenterGetImpedanceLimit(centerHandle, position)

    Get center impedance limit

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetImpedanceLimit()
    


    NetworkCenterGetNumberCenters(centerHandle)

    Get number of centers

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetNumberCenters()
    


    NetworkCenterGetPosition(centerHandle, node)

    Get center position given node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterGetPosition()
    


    NetworkCenterSetCapacity(centerHandle, position, capacity)

    Set center capacity

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterSetCapacity()
    


    NetworkCenterSetColor(centerHandle, position, red, green, blue)

    Set center color

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterSetColor()
    


    NetworkCenterSetImpedanceDelay(centerHandle, position, impedanceDelay)

    Set center impedance delay

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterSetImpedanceDelay()
    


    NetworkCenterSetImpedanceLimit(centerHandle, position, impedanceLimit)

    Set center impedance limit

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkCenterSetImpedanceLimit()
    


    NetworkClose(network)

    Close an open network handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkClose()
    


    NetworkGetNumberOfTables(network, typeFlag$)

    Get number of tables of given type

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkGetNumberOfTables()
    


    NetworkGetTableName(network, tableNumber, typeFlag$)

    Get a table name

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkGetTableName()
    


    NetworkInit(filename$, objname$)

    Create a (main) network handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkInit()
    


    NetworkInitCenter(network)

    Create a center handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkInitCenter()
    


    NetworkInitStop(network)

    Create a stop handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkInitStop()
    


    NetworkLineGetDemand(network, line)

    Get demand for a line

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetDemand()
    


    NetworkLineGetDirectionState(network, line, directionFlag$)

    Get line direction state

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetDirectionState()
    


    NetworkLineGetImpedance(network, line, directionFlag$)

    Get impedance for a line

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetImpedance()
    


    NetworkLineGetName(handle, lineNumber)

    Get line name

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetName()
    


    NetworkLineGetNodeFrom(network, line)

    Get the node a line is coming from

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetNodeFrom()
    


    NetworkLineGetNodeTo(network, line)

    Get the node a line is going to

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetNodeTo()
    


    NetworkLineGetNumberLines(network)

    Get number of lines

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineGetNumberLines()
    


    NetworkLineSetDemand(network, line, demand)

    Set demand for a line

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineSetDemand()
    


    NetworkLineSetDirectionState(network, line, directionFlag$, stateFlag$)

    Set line direction state

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineSetDirectionState()
    


    NetworkLineSetImpedance(network, line, impedance, directionFlag$)

    Set impedance for a line

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkLineSetImpedance()
    


    NetworkMultiRouteClose(multiRouteHandle)

    Close an open network multiroute handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jan-2001
    Modify Date: none
    Available in SML for Windows: Yes


    NetworkMultiRouteGetRoute(multiRouteHandle, destination, routeHandle)

    Calculate a route from multiroute to destination node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Jan-2001
    Modify Date: none
    Available in SML for Windows: Yes


    NetworkNodeGetBarrierState(network, node)

    Get barrier state for a node (boolean)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkNodeGetBarrierState()
    


    NetworkNodeGetName(handle, nodeNumber)

    Get node name

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkNodeGetName()
    


    NetworkNodeGetNumberNodes(network)

    Get number of nodes in network

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkNodeGetNumberNodes()
    


    NetworkNodeSetBarrierState(network, node, stateFlag$)

    Set barrier state for a node

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkNodeSetBarrierState()
    


    NetworkReadAttributeTable(network, tableName$, typeFlag$)

    Read an attribute table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkReadAttributeTable()
    


    NetworkRouteClose(routeHandle)

    Close an open route handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkRouteClose()
    


    NetworkRouteGetLine(routeHandle, position)

    Get a line from a position

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteGetLine()
    


    NetworkRouteGetLineDirection(routeHandle, position)

    Get line direction

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteGetLineDirection()
    


    NetworkRouteGetNode(routeHandle, position)

    Get a node from a position

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteGetNode()
    


    NetworkRouteGetNumberOfLines(routeHandle)

    Get number of lines in a route

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteGetNumberOfLines()
    


    NetworkRouteGetNumberOfNodes(routeHandle)

    Get number of nodes in a route

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteGetNumberOfNodes()
    


    NetworkRouteGetReport(routeHandle)

    Get a text report from a route handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteGetReport()
    


    NetworkRouteGetResultLineList(routeHandle, lineList)

    Get route result as line list

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkRouteGetResultLineList()
    


    NetworkRouteGetResultNodeList(routeHandle, nodeList)

    Get route result as node list

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkRouteGetResultNodeList()
    


    NetworkRouteGetResultPointList(routeHandle, xPoints, yPoints)

    Get route result as points

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkRouteGetResultPointList()
    


    NetworkRouteIsNodeStop(routeHandle, position)

    Is a node a stop (boolean)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteIsNodeStop()
    


    NetworkRouteIsNodeTurn(routeHandle, position)

    Is a node a turn (boolean)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteIsNodeTurn()
    


    NetworkRouteRestoreStop(routeHandle)

    Recover a stop handle from a route handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of NetworkRouteRestoreStop()
    


    NetworkSetDefaultAttributes(network)

    Set default attributes for a network

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkSetDefaultAttributes()
    


    NetworkStopAddStop(stopHandle, node, position)

    Add a stop

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopAddStop()
    


    NetworkStopCalculateRoute(stopHandle, routeHandle)

    Calculate a route from stop handle and route handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopCalculateRoute()
    


    NetworkStopCloneHandle(stopHandle)

    Copy a stop handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopCloneHandle()
    


    NetworkStopClose(stopHandle)

    Close an open stop handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopClose()
    


    NetworkStopDeleteAllStops(stopHandle)

    Delete all stops

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopDeleteAllStops()
    


    NetworkStopDeleteStops(stopHandle, stopList, number)

    Delete specific stops

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopDeleteStops()
    


    NetworkStopGet(stopHandle, position)

    Get a stop node given its position

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopGet()
    


    NetworkStopGetDemand(stopHandle, position)

    Get demand for a stop

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopGetDemand()
    


    NetworkStopGetNumberStops(stopHandle)

    Get number of stops

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopGetNumberStops()
    


    NetworkStopGetStopsList(stopHandle, stopList)

    Get the stop list for a stop handle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopGetStopsList()
    


    NetworkStopMove(stopHandle, oldPosition, newPosition)

    Move a stop (change stop list order)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopMove()
    


    NetworkStopSetDemand(stopHandle, position, demand)

    Set demand for a stop

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkStopSetDemand()
    


    NetworkTableIsTable(network, tableName$, typeFlag$)

    Is a table of given type and name part of network (boolean)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkTableIsTable()
    


    NetworkTableSetLineNameAsTableAndField(network, tableName$, fieldName$)

    Use table to set line names

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkTableSetLineNameTableAndField()
    


    NetworkTurnGetAngle(network, node, inAngle, outAngle)

    Get turn angle

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkTurnGetAngle()
    


    NetworkTurnGetImpedance(network, node, inAngle, outAngle)

    Get turn impedance

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkTurnGetImpedance()
    


    NetworkTurnSetImpedance(network, node, inAngle, outAngle, impedance)

    Set turn impedance

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkTurnSetImpedance()
    


    NetworkWriteAttributeTable(network, tableName$, typeFlag$)

    Write an attribute table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 17-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of NetworkWriteAttributeTable()
    


    Database Editor functions (12)


    DBEditorCloseTable(dbeditor, tablename$)

    Close a table opened via DBEditor

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 15-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of DBEditorCloseTable()
    


    DBEditorCreate(database)

    Creates a DBEDITOR handle for a given database.

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-May-2001
    Modify Date: none
    Available in SML for Windows: Yes


    DBEditorDestroy(dbeditor)

    Destroy a DBEDITOR handle created by DBEditorCreate().

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 24-May-2001
    Modify Date: none
    Available in SML for Windows: Yes


    DBEditorModalSingleRecordView(dbeditor, tablename$, record, parent, fieldname$, value, ...)

    Pops up a modal dialog to edit a database record

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 22-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorModalSingleRecordView()
    


    DBEditorOpenSingleRecordView(dbeditor, tablename$)

    Open single record view of a table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 15-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of DBEditorOpenSingleRecordView()
    


    DBEditorOpenTabularView(dbeditor, tablename$)

    Open a tabular view form of a table

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 15-Apr-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

          # Example of DBEditorOpenTabularView()
    


    DBEditorSingleRecordWidgetCreate(dbeditor, tablename$, parent)

    Create XmForm with controls to edit a database record

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorSingleRecordWidgetCreate()
    


    DBEditorSingleRecordWidgetGetFieldNum(srvwidget, fieldName$)

    Get a field value (numeric) from a Sincle Record Widget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 25-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorSingleRecordWidgetGetFieldNum()
    


    DBEditorSingleRecordWidgetGetFieldStr(srvwidget, fieldName$)

    Get a field value (string) from a Sincle Record Widget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 25-Jun-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorSingleRecordWidgetGetFieldStr()
    


    DBEditorSingleRecordWidgetSaveChanges(srvwidget)

    Save changes to a record in a SingleRecordWidget (returns record number)

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorSingleRecordWidgetSaveChanges()
    


    DBEditorSingleRecordWidgetSetField(srvwidget, fieldname$, value)

    Set the value of a field in a Single Record Widget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorSingleRecordWidgetSetField()
    


    DBEditorSingleRecordWidgetSetRecord(srvwidget, record)

    Load a record into a SingleRecordWidget

    Where:

    Parameters:

    Details:

    Returns:

    Create Date: 23-Sep-1998
    Modify Date: none
    Available in SML for Windows: Yes

    Example:

           # Example of DBEditorSingleRecordWidgetSetRecord()
    


    Total Number of Functions: 954