SML FUNCTION LIST

SML module date: Jan 4 2005

  • Math
  • Date
  • Set
  • String
  • Database
  • Raster
  • Vector
  • Object
  • Matrix
  • Georeference
  • Color_palette
  • Style
  • System
  • Color_conversion
  • Popup_dialog
  • Cad
  • Tin
  • File
  • Ini_file
  • Resource_file
  • Symbol
  • Cartoscript
  • Print

    Math functions (65)

    abs
    Absolute value

    abs(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    acos
    Trigonometric arccosine

    acos(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    acosd
    Trigonometric arccosine (degree version)

    acosd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    acosh
    Hyperbolic arccosine

    acosh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    acoth
    Hyperbolic arccotangent

    acoth(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    acsch
    Hyperbolic arccosecant

    acsch(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    asech
    Hyperbolic arcsecant

    asech(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    asin
    Trigonometric arcsine

    asin(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    asind
    Trigonometric arcsine (degree version)

    asind(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    asinh
    Hyperbolic arcsine

    asinh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    atan
    Trigonometric arctangent

    atan(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    atan2
    Trigonometric arctangent

    atan2(y, x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    atand
    Trigonometric arctangent (degree version)

    atand(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    atanh
    Hyperbolic arctangent

    atanh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    Bound
    Force a value into given range.

    Bound(val, min, max)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(Bound(15, 0, 10));
    print(Bound(-5, 0, 10));
    print(Bound(5, 0, 10));
    


    ceil
    Round decimal up to integer

    ceil(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    numeric a, b, c, d;
    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
    Converts polar coordinates to rectangular (radians).

    ConvertPolartoXY(Theta, R, X, Y)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertPolartoXYd
    Converts polar coordinates to rectangular (degrees).

    ConvertPolartoXYd(Theta, R, X, Y)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertSphericaltoXYZ
    Converts polar coordinates to rectangular (radians).

    ConvertSphericaltoXYZ(Rho, Theta, Phi, X, Y, Z)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertSphericaltoXYZd
    Converts polar coordinates to rectangular (degrees).

    ConvertSphericaltoXYZd(Rho, Theta, Phi, X, Y, Z)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYtoPolar
    Converts rectangular coordinates to polar (radians).

    ConvertXYtoPolar(X, Y, Theta, R)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYtoPolard
    Converts rectangular coordinates to polar (degrees).

    ConvertXYtoPolard(X, Y, Theta, R)

    場所:

    パラメータ:

    戻り値

    作成日時: 16-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYZtoSpherical
    Converts rectangular coordinates to spherical (radians).

    ConvertXYZtoSpherical(X, Y, Z, Rho, Theta, Phi)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ConvertXYZtoSphericald
    Converts rectangular coordinates to spherical (degrees).

    ConvertXYZtoSphericald(X, Y, Z, Rho, Theta, Phi)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 22-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric a1[10];
    array numeric a2[10];
    numeric x;
    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
    Trigonometric cosine

    cos(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    cosd
    Trigonometric cosine (degree version)

    cosd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/CAD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    cosh
    Hyperbolic cosine

    cosh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    csc
    Trigonometric cosecant

    csc(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    cscd
    Trigonometric cosecant (degree version)

    cscd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ctn
    Trigonometric cotangent

    ctn(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    ctnd
    Trigonometric cotangent (degree version)

    ctnd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

    Displacement3D(X1, Y1, Z1, X2, Y2, Z2, Distance, Azimuth, Elevation)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class POINT3D pt1, pt2;
    pt1.x = 500;
    pt1.y = 500;
    pt1.z = 0;
    pt2.x = 1000;
    pt2.y = 1000;
    pt2.z = sqrt(500000); # sqrt(500^2 + 500^2)
    numeric distance, azimuth, elevation;
    # in radians
    Displacement3D(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    # in degrees
    Displacement3Dd(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    


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

    Displacement3Dd(X1, Y1, Z1, X2, Y2, Z2, Distance, Azimuth, Elevation)

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class POINT3D pt1, pt2;
    pt1.x = 500;
    pt1.y = 500;
    pt1.z = 0;
    pt2.x = 1000;
    pt2.y = 1000;
    pt2.z = sqrt(500000); # sqrt(500^2 + 500^2)
    numeric distance, azimuth, elevation;
    # in radians
    Displacement3D(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    # in degrees
    Displacement3Dd(pt1.x, pt1.y, pt1.z, pt2.x, pt2.y, pt2.z, distance, azimuth, elevation);
    print(distance, azimuth, elevation);
    


    exp
    Exponential (e to the power of x)

    exp(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    exp10
    Exponential (10 to the power of x)

    exp10(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    floor
    Round decimal down to integer

    floor(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    GetUnitConvAngle
    Get scale factor for angle unit conversions.

    GetUnitConvAngle(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetUnitConvArea
    Get scale factor for area unit conversions.

    GetUnitConvArea(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Dialog/areacalc.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetUnitConvDist
    Get scale factor for distance unit conversions.

    GetUnitConvDist(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/MacroScript/ZOOMTO.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetUnitConvVolume
    Get scale factor for volume unit.

    GetUnitConvVolume(from$, to$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    hypot
    Find hypotenuse of right triangle

    hypot(dx, dy)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    int
    Integer portion of argument (truncate)

    int(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    IsNull
    Does the argument have the value NULL?

    IsNull(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(IsNull(null));
    


    LinearRegression
    Calculate the linear regression coeficients for a group of points.

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

    場所:

    パラメータ:

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    log
    Natural logarithm of argument

    log(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    log10
    Base 10 logarithm of argument

    log10(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 22-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric xpoints[4];
    array numeric ypoints[4];
    array numeric carray[3];
    numeric r;
    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 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
    Return x to the power of y

    pow(x, y)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    rand
    Returns random value between zero (0) and x

    rand(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(rand(1));
    


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

    RandomGaussian(mu, sigma, x1, x2)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

    ResizeArrayClear(array, index1Size, index2Size)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 08-Oct-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric a[3];
    array numeric 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
    Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )

    ResizeArrayPreserve(array, index1Size, index2Size)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 08-Oct-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    array numeric a[3];
    array numeric 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
    Round x to nearest integer

    round(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    sec
    Trigonometric secant

    sec(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(sec(60/deg));
    


    secd
    Trigonometric secant (degree version)

    secd(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

    Sign(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jun-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(Sign(-10));      # -1
    print(Sign(0));       # 0
    print(Sign(10));       # 1
    


    sin
    Trigonometric sine

    sin(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    sind
    Trigonometric sine (degree version)

    sind(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/CAD.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    sinh
    Hyperbolic sine

    sinh(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    sqr
    Return the square of the argument

    sqr(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    sqrt
    Returns the (positive) square root of the argument

    sqrt(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    tan
    Trigonometric tangent

    tan(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    tand
    Trigonometric tangent (degree version)

    tand(x)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    tanh
    Hyperbolic tangent

    tanh(x)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    Date functions (6)

    Date
    Returns the current date in YYYYMMDD format

    Date()

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d;
    d=Date();
    print(d);
    


    DateDiff
    Returns number of days between two dates

    DateDiff(yyyymmdd1, yyyymmdd2)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=DateDiff(19960101, 19970101);
    print(d); # 365
    


    DateToJulian
    Converts YYYYMMDD format to Julian date

    DateToJulian(yyyymmdd)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 17-Jun-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=DateToJulian(19960101);
    print(d);
    print(JulianToDate(d));
    


    DateToString
    Convert a number date to a string.

    DateToString(yyyymmdd, format$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(DateToString(20031208)); # 12/08/03
    


    JulianDate
    Returns the current Julian date

    JulianDate()

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=JulianDate();
    print(d);
    


    JulianToDate
    Converts Julian date to YYYYMMDD format

    JulianToDate(julian)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric d=DateToJulian(19960101);
    print(d);
    print(JulianToDate(d));
    


    Set functions (11)

    SetMajority
    Most frequently occurring value among arguments

    SetMajority(x1, x2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetMax
    Returns the largest of argument values

    SetMax(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetMean
    Returns average of argument values

    SetMean(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMean(1, 2, 2, 5, 5)); # prints 3 (15/5)
    


    SetMedian
    Returns the median of argument values

    SetMedian(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMedian(1, 3, 7)); # prints 3
    


    SetMin
    Returns minimum value among arguments

    SetMin(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(SetMin(1, 3, 5)); # prints 1
    


    SetMinority
    Least frequently occurring value among arguments

    SetMinority(x1, x2, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetNum
    Returns the total number of elements

    SetNum(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetSD
    Returns standard deviation of argument values

    SetSD(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetSum
    Returns sum of arguments

    SetSum(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetVariance
    Returns statistical variance of argument values

    SetVariance(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    SetVariety
    Returns number of different values among arguments

    SetVariety(x1, x2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    String functions (16)

    DegToStr
    Convert degrees to a string, in degrees, minutes, seconds format

    DegToStr(num)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    FileNameGetExt
    Returns file extension portion of path qualified filename

    FileNameGetExt(filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string f$ = GetInputFileName("", "Select a file","");
    print(FileNameGetExt(f$));
    


    FileNameGetName
    Returns filename portion of path qualified filename

    FileNameGetName(filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string f$ = GetInputFileName("", "Select a file","");
    print(FileNameGetName(f$));
    


    FileNameGetPath
    Returns path portion of path qualified filename

    FileNameGetPath(filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string f$ = GetInputFileName("", "Select a file","");
    print(FileNameGetPath(f$));
    


    GetToken
    Get the nth token from a string

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 25-Sep-1998
    修正日時: 05-Jun-2001
    TNTsml for Windows で使用可能: はい

    例:

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


    left$
    Return leftmost n characters of string

    left$(str$, length)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    mid$
    Return n characters of string$ starting at m

    mid$(str$, start, length)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumberTokens
    Returns number of tokens in a string - used to loop through them

    NumberTokens(string$, delimiters$)

    場所:

    パラメータ:

    戻り値

    作成日時: 25-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumToStr
    Convert a number to a string

    NumToStr(num)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print("Enter a number.");
    numeric n=input();
    string nstr$ = NumToStr(n);
    # one can now do any string operations desired on nstr$
    print(nstr$);
    


    right$
    Return right-most n characters of string$

    right$(str$, length)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print("Enter a sentence.");
           string a$=input$();
    print("Enter # of chars to get from the end of the string.");
           numeric n=input();
    print(right$(a$, n));
    


    sprintf
    Assign formatted text to a string variable

    sprintf(format$, value, ...)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    strlen
    Returns number of characters in string variable

    strlen(str$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    StrToDeg
    Convert string in degrees, minutes, seconds format to decimal degrees

    StrToDeg(str$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 16-Nov-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    print(StrToDeg("S 24 30 00"));
    


    StrToNum
    Return numerical value of string with number in it

    StrToNum(str$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string a$;
    print("Enter a number. "); # would be better to just input as numeric
           a$=input$();
    numeric b=StrToNum(a$);
    print(b/10);
    


    tolower$
    Convert string to lower case

    tolower$(string$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(tolower$("MiXeD CaSe")); # mixed case;
    


    toupper$
    Convert string to upper case

    toupper$(string$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    print(toupper$("MiXeD CaSe")); # MIXED CASE;
    


    Database functions (45)

    CloseDatabase
    Close an open database instance

    CloseDatabase(db)

    場所:

    パラメータ:

    戻り値

    作成日時: 21-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    DatabaseCreate
    Create a 'standalone' database object

    DatabaseCreate(filename$, name$, description$)

    場所:

    パラメータ:

    戻り値

    作成日時: 02-Jun-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string file$ = "C:/test.rvc";
    numeric err = DatabaseCreate(file$, "name", "desc");
    if (err < 0) print("error occurred creating database");
    else
    {
           # open database and add table to database
    }
    


    DatabaseGetTableInfo
    Get database table information

    DatabaseGetTableInfo(database, name)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 29-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/cumul.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FieldGetInfoByName
    Returns a field class given the field name.

    FieldGetInfoByName(table, name$)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/create.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    FieldGetInfoByNumber
    Returns a field class given the field number.

    FieldGetInfoByNumber(table, number)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DATABASE db;
    class DBTABLEINFO table, table2;
    class DBFIELDINFO field, fieldcopy;
    vector V;
    numeric tablenum=1;
    GetInputVector(V);     # used cb_soils
    db = OpenVectorPolyDatabase(V);
    if(TableExists(db, tablenum))
    {
           table = DatabaseGetTableInfo(db, tablenum);
           field = FieldGetInfoByNumber(table, 1);       # get the first field
           fieldcopy = field;
           table2 = TableCreate(db, "NewTable", "Desc");
           TableAddField(table2, field);                # copy it to a second table
           print(field.Name,"added.");
    }
    else print("No table found");
    


    NumRecords
    Returns number of records in database table

    NumRecords(table)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    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'.
    numeric n=NumRecords(V.poly.YIELD);
    print("Record count:", n);
    


    OpenCADDatabase
    Open the database subobject of a CAD object

    OpenCADDatabase(CADVar)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jun-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    cad C;
    GetOutputCAD(C);
    class DATABASE db;
    class DBTABLEINFO table;
    # write a point
    numeric xin = 100, yin = 200;
    CADWritePoint(C, 1, xin, yin);
    CADWritePoint(C, 1, xin+yin, yin);
    CADWritePoint(C, 1, xin-yin, yin);
    CADWritePoint(C, 1, xin, yin+xin);
    # now create a table
    db = OpenCADDatabase(C);
    table = TableCreate(db, "MyTable", "Newly Created Table");
    TableAddFieldInteger(table, "NewField");
    # write some important info to the db table
    TableWriteRecord(table, 0, 55);
    TableWriteRecord(table, 0, 45);
    # attach the records to elements
    CADAttachDBRecord(C, 1, 1, table, 1);
    CADUnattachDBRecord(C, 1, 1, table, 1);
    CADAttachDBRecord(C, 1, 1, table, 2);
    CADAttachDBRecord(C, 1, 2, table, 1);
    CADAttachDBRecord(C, 1, 3, table, 2);
    CADAttachDBRecord(C, 1, 4, table, 1);
    


    OpenDatabase
    Open a main level database

    OpenDatabase(filename$, objectname$)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenRasterDatabase
    Returns a database class for functions that need one.

    OpenRasterDatabase(Rast)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/classifyRaster.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenTINDatabase
    Open the database subobject of a TIN object

    OpenTINDatabase(TINVar)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-Jun-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin T;
    class DATABASE db;
    class DBTABLEINFO table;
    GetInputTIN(T);
    db = OpenTINDatabase(T);
    table = TableCreate(db, "MyTINTable", "Newly create tin db table");
    TableAddFieldInteger(table, "IntField");
    # write some important info to the db table
    TableWriteRecord(table, 0, 55);
    TableWriteRecord(table, 0, 45);
    # one could then set up attachment or relation as desired
    


    OpenVectorLineDatabase
    Returns a database class for functions that need one.

    OpenVectorLineDatabase(Vect)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenVectorNodeDatabase
    Opens the Node database of the specified vector

    OpenVectorNodeDatabase(Vect)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/NETWORK1.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenVectorPointDatabase
    Open a Vector point database

    OpenVectorPointDatabase(Vect)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    OpenVectorPolyDatabase
    Returns a database class for functions that need one.

    OpenVectorPolyDatabase(Vect)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    RecordDelete
    Delete one or more records.

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

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableAddField
    Append a field to a table

    TableAddField(table, field)

    場所:

    パラメータ:

    戻り値

    作成日時: 08-Jun-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DATABASE db;
    class DBTABLEINFO table, table2;
    class DBFIELDINFO field, fieldcopy;
    vector V;
    numeric tablenum=1;
    GetInputVector(V);     # used cb_soils
    db = OpenVectorPolyDatabase(V);
    if(TableExists(db, tablenum))
    {
           table = DatabaseGetTableInfo(db, tablenum);
           field = FieldGetInfoByNumber(table, 1);       # get the first field
           fieldcopy = field;
           table2 = TableCreate(db, "NewTable", "Desc");
           TableAddField(table2, field);                # copy it to a second table
           print(field.Name,"added.");
    }
    else print("No table found");
    


    TableAddFieldFloat
    Add a new field of type float.

    TableAddFieldFloat(table, name$, dispwidth, places)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/CreateTable.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableAddFieldInteger
    Add a new field of type Integer.

    TableAddFieldInteger(table, name$, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/DB2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableAddFieldString
    Add a new field of type string.

    TableAddFieldString(table, name$, maxlength, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/DB2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableCopy
    Copy a database table from one object's database to another

    TableCopy(databaseSrc, table, databaseDest)

    場所:

    パラメータ:

    戻り値

    作成日時: 08-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2;
    GetInputVector(V1);
    GetInputVector(V2);
    class DATABASE db1, db2;
    class DBTABLEINFO t1;
    db1 = OpenVectorPolyDatabase(V1);
    db2 = OpenVectorPolyDatabase(V2);
    string table$;
    PopupSelectTable(db1, table$);
    t1 = DatabaseGetTableInfo(db1, table$);
    numeric num = TableCopy(db1, t1, db2);
    print(num);
    


    TableCopyToDBASE
    Copy a database table to a DBASE file

    TableCopyToDBASE(table, filename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 11-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$, dbffile$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           # open the db and table
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           # save the table to dbase
           dbffile$ = GetOutputFileName(tablename$, "Where would you like to save the table?", "dbf");
           table = DatabaseGetTableInfo(db, tablename$);
           TableCopyToDBASE(table, dbffile$);
           # for demonstration purposes, let's create a link to that dbase file
           TableLinkDBASE(db, dbffile$, tablename$+"Link", "Table linked from dbase");
    }
    else print("Cannot open polygon database");
    


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

    TableCreate(database, name$, description$)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/DB2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableDelete
    Drops a table from its database

    TableDelete(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
                  numeric err = 0;
                  db = OpenVectorPolyDatabase(V);
                  PopupSelectTable(db, tablename$);
                  print("You selected:", tablename$);
                  table = DatabaseGetTableInfo(db, tablename$);
                  err = TableDelete(table);
                  if (err<0) print("An error occurred");
                  else print("Table deleted successfully.");
    }
    


    TableExists
    Returns 1 if table exists, 0 if table doesn't exist

    TableExists(database, name)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 27-Nov-2000
    修正日時: 16-Jul-2003
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableGetInfo
    Returns a table class.

    TableGetInfo(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vect;
    class DBTABLEINFO table;
    table = TableGetInfo(Vect.poly.YIELD);
    # Another example:
    string tablename$ = "YIELD";
    table = TableGetInfo(Vect.poly.(tablename$));
    


    TableGetRecordElementList
    Get list of elements with a given record attached or related

    TableGetRecordElementList(table, recordNum, elements, element_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TableGetRecordListElementList
    Get list of elements to which a given list of records are attached or related

    TableGetRecordListElementList(table, records, num_records, elements, element_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

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

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    class DBFIELDINFO field;
    vector V;
    string table$, field$;
    # let the user select the desired Vect.Table.Field
    # the script will insert fields prior to the one selected
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    table = DatabaseGetTableInfo(db, table$);
    field = FieldGetInfoByName(table, field$);
    numeric dispwidth=10, places=2;
    TableInsertFieldFloat(table, "FloatField", field, dispwidth, places);
    TableInsertFieldInteger(table, "IntegerField", field, dispwidth);
    TableInsertFieldString(table, "StringField", field, dispwidth*2);
    print(table$ + "." + field$);
    


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

    TableInsertFieldInteger(table, name$, before, dispwidth)

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    class DBFIELDINFO field;
    vector V;
    string table$, field$;
    # let the user select the desired Vect.Table.Field
    # the script will insert fields prior to the one selected
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    table = DatabaseGetTableInfo(db, table$);
    field = FieldGetInfoByName(table, field$);
    numeric dispwidth=10, places=2;
    TableInsertFieldFloat(table, "FloatField", field, dispwidth, places);
    TableInsertFieldInteger(table, "IntegerField", field, dispwidth);
    TableInsertFieldString(table, "StringField", field, dispwidth*2);
    print(table$ + "." + field$);
    


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

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

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    class DBFIELDINFO field;
    vector V;
    string table$, field$;
    # let the user select the desired Vect.Table.Field
    # the script will insert fields prior to the one selected
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    table = DatabaseGetTableInfo(db, table$);
    field = FieldGetInfoByName(table, field$);
    numeric dispwidth=10, places=2;
    TableInsertFieldFloat(table, "FloatField", field, dispwidth, places);
    TableInsertFieldInteger(table, "IntegerField", field, dispwidth);
    TableInsertFieldString(table, "StringField", field, dispwidth*2);
    print(table$ + "." + field$);
    


    TableKeyFieldLookup
    Find the first record in a table that matches a given value

    TableKeyFieldLookup(table, fieldName$, fieldValue1, comparison_type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class DATABASE db;
    class DBTABLEINFO table;
    vector V;
    string table$, field$;
    numeric value = 5;     # the value to search for
    numeric found=0;
    # have user select vector, table, and field
    GetInputVector(V);
    db = OpenVectorPolyDatabase(V);
    PopupSelectTableField(db, table$, field$);
    print(table$+"."+field$);
    # get the table
    table = DatabaseGetTableInfo(db, table$);
    found = TableKeyFieldLookup(table, field$, value);
    print(found);
    if (found>0)
    {
           print(table$ + "." + field$ + " record number", found, "is the first match.");
    }
    else print("No match found.");
    


    TableKeyFieldLookupList
    Find the set of record in a table that matches a given value

    TableKeyFieldLookupList(table, fieldName$, fieldValue1, record_list, comparison_type$)

    場所:

    パラメータ:

    戻り値

    作成日時: 24-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TableLinkDBASE
    Makes a link to a dBase file.

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

    場所:

    パラメータ:

    戻り値

    作成日時: 06-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$, dbffile$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           # open the db and table
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           # save the table to dbase
           dbffile$ = GetOutputFileName(tablename$, "Where would you like to save the table?", "dbf");
           table = DatabaseGetTableInfo(db, tablename$);
           TableCopyToDBASE(table, dbffile$);
           # for demonstration purposes, let's create a link to that dbase file
           TableLinkDBASE(db, dbffile$, tablename$+"Link", "Table linked from dbase");
    }
    else print("Cannot open polygon database");
    


    TableNewRecord
    Add new record to a database

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

    場所:

    パラメータ:

    戻り値

    作成日時: 29-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableOpen
    Open a database table

    TableOpen(database, tablename$)

    場所:

    パラメータ:

    戻り値

    作成日時: 26-May-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


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

    TableReadAttachment(table, element_number, records, element_type$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 14-Nov-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableReadFieldNum
    Read a number from a table (using DBTABLEINFO)

    TableReadFieldNum(table, fieldName$, recordNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/attach.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableReadFieldStr
    Read a string from a table (using DBTABLEINFO)

    TableReadFieldStr(table, fieldName$, recordNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 12-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/tiger.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableRemoveAttachment
    Detaches records from an element in a object

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

    場所:

    パラメータ:

    戻り値

    作成日時: 14-Nov-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # CAUTION: This script will attempt to remove some attachments
    # between elements and their db records.  For example purposes only!
    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           
           print("You have sealed the fate of table:",tablename$);
           table = DatabaseGetTableInfo(db, tablename$);
           
           # mark all records for their ensuing detachment
           array numeric records[table.NumRecords];
           numeric numrecords=0;
           numeric i;
           for i=1 to NumVectorPolys(V) step 2    # deattach every other element
           {
                  numrecords = TableReadAttachment(table, i, records);
                  TableRemoveAttachment(table, i, records, numrecords);
           }
    }
    


    TableRemoveDuplicateRecords
    Deletes duplicate records from the table

    TableRemoveDuplicateRecords(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           numeric err = 0;
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           table = DatabaseGetTableInfo(db, tablename$);
           err = TableRemoveDuplicateRecords(table);
           if (err<0) print("An error occurred");
           else print(err,  "duplicate records removed");
    }
    


    TableRemoveUnattachedRecords
    Deletes unattached records from the table

    TableRemoveUnattachedRecords(table)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Mar-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    class DBTABLEINFO table;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           numeric err = 0;
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
           table = DatabaseGetTableInfo(db, tablename$);
           err = TableRemoveUnattachedRecords(table);
           if (err<0) print("An error occurred.");
           else print("All unattached records have been removed.");
    }
    


    TableTriggerRecordChangedCallback
    Mark an externally altered record/table as changed

    TableTriggerRecordChangedCallback(table, recordNum)

    場所:

    パラメータ:

    戻り値

    作成日時: 12-May-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/VisualBasic/ParcelToolModeless.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    TableWriteAttachment
    Attaches records in a table to an element in a object

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 14-Nov-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    TableWriteField
    Write the value of an given field to an existing database record

    TableWriteField(table, recordNum, fieldName$, fieldValue)

    場所:

    パラメータ:

    戻り値

    作成日時: 08-Nov-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class DATABASE database;
    vector V;
    string tablename$, field$;
    GetInputVector(V);
    database = OpenVectorPolyDatabase(V);
    PopupSelectTableField(database, tablename$, field$);
    print(tablename$ + "." + field$);
    class DBTABLEINFO table;
    table = DatabaseGetTableInfo(database, tablename$);
    # Write the value 999 to the selected field in record 3
    numeric err = TableWriteField(table, 3, field$, 999);
    PopupError(err);
    


    TableWriteRecord
    Write values to an existing database record

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

    場所:

    パラメータ:

    戻り値

    作成日時: 15-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);# cbsoils_lite used
    class DBTABLEINFO table;
    table = TableGetInfo(V.poly.CLASS);
    numeric recordNum = TableWriteRecord(table, 0, "AAAAA");
    print(recordNum);
    


    Raster functions (5)

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

    GetInputRaster(Raster, lins, cols, datatype$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    numeric lines=488, columns=361; # Crow Butte TM raster dimensions
    string 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
    Get more than one raster.

    GetInputRasters(Raster, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Red, Green, Blue;
    GetInputRasters(Red, Green, Blue);
    


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

    GetOutputRaster(Raster, lins, cols, datatype$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R, R2;
    GetInputRaster(R);
    numeric lin = 1024, col = 512;
    string type$="8-bit unsigned";
    # allow selection or creation of a raster identical
    # in size and type to R.
    GetOutputRaster(R2, lin, col, type$);
    CloseRaster(R);
    CloseRaster(R2);
    


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

    RasterExists(filename$, objectname$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    SelectInputObject
    Popup dialog to select an object

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

    場所:

    パラメータ:

    戻り値

    作成日時: 18-Nov-1998
    修正日時: 17-May-2000
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    Vector functions (38)

    CloseVector
    Close a Vector object.

    CloseVector(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    GetInputVector(V);
    # do something with V
    CloseVector(V);
    


    CreateTempVector
    Create a temporary Vector object.

    CreateTempVector(Vector, flag1$, flag2$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 10-Apr-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    vector VTemp;
    CreateTempVector(VTemp);
    # do something with it
    CloseVector(VTemp);
    


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

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

    場所:

    パラメータ:

    戻り値

    作成日時: 07-May-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    vector Vpoly, Vplanar, Vnetwork, Vnotopo;
    CreateVector(Vpoly,    "c:/tnt/testCreateVector.rvc", "Vpoly",    "Polygonal",  "Polygonal");
    CreateVector(Vplanar,  "c:/tnt/testCreateVector.rvc", "Vplanar",  "Planar",     "Planar");
    CreateVector(Vnetwork, "c:/tnt/testCreateVector.rvc", "Vnetwork", "Network",    "Network");
    CreateVector(Vnotopo,  "c:/tnt/testCreateVector.rvc", "Vnotopo",  "NoTopology", "NoTopology");
    # Do something with one of the objects
    # add three points to the network vector
    VectorAddPoint(Vnetwork, 0, 0);
    VectorAddPoint(Vnetwork, 25, 25);
    VectorAddPoint(Vnetwork, 50, 50);
    # close the objects
    CloseVector(Vpoly);
    CloseVector(Vplanar);
    CloseVector(Vnetwork);
    CloseVector(Vnotopo);
    


    FindClosestLabel
    Find closest Vector label.

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

    場所:

    パラメータ:

    戻り値

    作成日時: 22-Jun-1981
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

    # Find the label closest to the 'object center'
    vector Vin;
    class Georef georef;
    GetInputVector(Vin);
    georef = GetGeorefObject(Vin);
    # find the x and y midpoint
    numeric xMin, xMax, yMin, yMax;
    GetObjectExtents(Vin, xMin, yMin, xMax, yMax, georef);
    numeric midX = (xMax + xMin)/2;
    numeric midY = (yMax + yMin)/2;
    numeric dist = xMax-midX;
    numeric numberLabels = NumVectorLabels(Vin);
    numeric labelnum = FindClosestLabel(Vin, midX, midY, georef, dist);
    print("number", numberLabels, "closest", labelnum);
    


    FindClosestLine
    Return line element closest to x,y coordinates

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

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


    FindClosestNode
    Return node element closest to x,y coordinates

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

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


    FindClosestPoint
    Return point element closest to x,y coordinates

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

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


    FindClosestPoly
    Return polygon element closest to x,y coordinates

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: 24-Jun-1999
    TNTsml for Windows で使用可能: はい

    例:

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


    GenerateCrossSection
    Generate a vector cross section

    GenerateCrossSection(polyline, srcObject, surfObject, destObject, baseValue, flags$)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Apr-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Vector src, dest;
    Raster surf;
    # set the base value
    numeric baseValue = 0;
    # get the input objects
    GetInputVector(src);
    GetInputRaster(surf);
    GetOutputVector(dest);
    # set up the polyline (w/ georeferenced pt coords)
    class POLYLINE polyline;
    numeric xmin, ymin, xmax, ymax;
    class GEOREF g = GetLastUsedGeorefObject(src);
    GetObjectExtents(src, xmin, ymin, xmax, ymax, g);
    # add the points to the polyline
    class POINT2D tmp;
    tmp.x = xmin; tmp.y = ymin;
    polyline.AppendVertex(tmp);
    tmp.x = xmax; tmp.y = ymax;
    polyline.AppendVertex(tmp);
    # do the cross section
    numeric err = GenerateCrossSection(polyline, src, surf, dest, baseValue, "NoGeoreference");
    PopupError(err);
    


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

    GetInputVector(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector Vvar;
    GetInputVector(Vvar);
    # do something with it
    CloseVector(Vvar);
    


    GetInputVectorList
    Get multiple Vector objects.

    GetInputVectorList(VectorList, prompt$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/vector2raster.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetOutputVector
    Open a vector object for use with vector toolkit funtions

    GetOutputVector(Vector, flag1$, flag2$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    array numeric xPoints[10], yPoints[10];
    # 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
    numeric i;
    for i = 1 to 4 {
           VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150);
           }
    numeric numPolys = NumVectorPolys(V);
    numeric numberPoints = NumVectorPoints(V);
    print("number of polygons, points: ", numPolys, numberPoints);
    


    GetVectorLine
    Returns the polyine given the line element number.

    GetVectorLine(Vectvar, element)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class POLYLINE pline;
    numeric linenum = 10;
    GetInputVector(V);
    pline = GetVectorLine(V, linenum);
    print("Length =",pline.ComputeLength());
    print("NumPts =",pline.GetNumPoints());
    if(pline.IsClosed())   print("The line is closed");
    else print("The line is not closed");
    


    GetVectorLinePointList
    Returns (via arrays 'xarray' and 'yarray', and optional 'zarray') a list of points in a line.

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

    GetVectorNodeLineList(Vector, lines, node)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

    GetVectorPolyAdjacentPolyList(Vector, polygonList, polygonNumber)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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
    vector V;
    array numeric polygonList[10]; # array to hold poly list
    clear();
    GetInputVector(V);
    numeric polygonNumber = 150; # polygonNumber = 150 works for cb_soils/CBSOILS_Lite
    numeric numadjacent = GetVectorPolyAdjacentPolyList(V, polygonList, polygonNumber);
    string temp$ = "number of polygons adjacent to polygon:";
    print(temp$, polygonNumber, " = ", numadjacent);
    numeric i;
    for i = 1 to numadjacent {
           print(i, ":", polygonList[i]);
           }
    print("Done");
    


    GetVectorPolyIslandList
    Returns (via array 'islands') a list of islands of a polygon.

    GetVectorPolyIslandList(Vector, islands, polygon)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    GetVectorPolyLineList
    Returns (via array 'lines') a list of lines forming a polygon

    GetVectorPolyLineList(Vector, lines, polygon)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumVectorLabels
    Returns number of labels in a vector object

    NumVectorLabels(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumVectorLines
    Returns number of lines in vector object

    NumVectorLines(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumVectorNodes
    Returns number of nodes in vector object

    NumVectorNodes(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumVectorPoints
    Returns number of points in vector object

    NumVectorPoints(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    NumVectorPolys
    Returns number of polygons in vector object

    NumVectorPolys(Vector)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    OpenInputVectorList
    Open multiple Vector objects

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

    場所:

    パラメータ:

    戻り値

    作成日時: 19-May-1998
    修正日時: 19-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

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

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V;
    string fileName$ = "c:/tnt/data/cb_data/cb_soils.rvc";
    string objectName$ = "CBSOILS_Lite";
    # open the vector for editing with the toolkit
    OpenVector(V, fileName$, objectName$, "VectorToolkit");
    


    VectMerge
    Merge two or more Vector objects

    VectMerge(Obj1, Obj2, ...)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2, Vmerge;
    GetInputVector(V1);
    GetInputVector(V2);
    GetOutputVector(Vmerge);
    Vmerge = VectMerge(V1, V2);
    # get georef for merge
    class Georef georef;
    georef = GetLastUsedGeorefObject(V1);
    CopyGeorefToObject(Vmerge, georef);
    


    VectorAND
    Returns Vector that is the logical result of two input vectors

    VectorAND(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorCopyElements
    Returns Vector with elements from Source that meet the query selection criteria

    VectorCopyElements(SourceVector, DestVector, flags$, pointQuery$, lineQuery$, polyQuery$)

    場所:

    パラメータ:

    戻り値

    作成日時: 22-Mar-2004
    修正日時: 13-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2;
    GetInputVector(V1);
    GetOutputVector(V2);
    VectorCopyElements(V1, V2, "None","0","LINESTATS.Length>1000","0");
    #VectorCopyElements(V1, V2); # for a 'straight copy'
    


    VectorElementInRegion
    Tests a Vector element against a region.

    VectorElementInRegion(Region, Vectvar, element, ElemType$, TestType$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector Vin;
    region reg;
    GetInputVector(Vin);
    GetInputRegion(reg);
    numeric elementNumber = 1;
    numeric inRegion = VectorElementInRegion(reg.$Data, Vin, elementNumber, "line", "CompletelyInside");
    if (inRegion)
           print( "element ", elementNumber, "is CompletelyInside\n");
    


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

    VectorExists(filename$, objectname$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string file$="c:/tnt/data/sf_data/haywsoil.rvc";
    string ob$="hsoils";
    if (VectorExists(file$, ob$)) then
           print("Vector ", ob$, "Exists in ", file$);
    


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

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    VectorIsEquivalent
    Determine if two Vector objects are equivalent

    VectorIsEquivalent(Vector1, Vector2)

    場所:

    パラメータ:

    戻り値

    作成日時: 23-Apr-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    VectorOR
    Returns Vector that is the logical result of two input vectors

    VectorOR(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorReplace
    Returns Vector that is the logical result of two input vectors

    VectorReplace(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorSubtract
    Returns Vector that is the logical result of two input vectors

    VectorSubtract(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


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

    VectorToolkitInit(Vector, flag2$)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/Misc/addline.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    VectorWarp
    Warp the SourceVector from the transparm's source to destination projection

    VectorWarp(SourceVector, DestVector, Transparm, DenseAccuracy)

    場所:

    パラメータ:

    戻り値

    作成日時: 04-May-2004
    修正日時: 13-May-2004
    TNTsml for Windows で使用可能: はい

    例:

    vector Vin, Vout;
    class TRANSPARM transparm;
    class GEOREF georef;
    class MAPPROJ inputProj, outputProj;
    GetInputVector(Vin);
    GetOutputVector(Vout);
    georef = GetLastUsedGeorefObject(Vin);
    inputProj = georef.Projection;
    outputProj.SetSystemUTM(13);
    outputProj.Datum = "North American 1927 - United States (NADCON)";
    transparm.InputProjection = inputProj;
    transparm.OutputProjection = outputProj;
    VectorWarp(Vin, Vout, transparm, 10);
    print("IN:", transparm.inputProjection.System);
    print("OUT:", transparm.outputProjection.System);
    


    VectorXOR
    Returns Vector that is the logical result of two input vectors

    VectorXOR(OperatorVector, SourceVector, flags$)

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/vecop.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    Object functions (28)

    CloseStyleObject
    Close an open style object

    CloseStyleObject(style)

    場所:

    パラメータ:

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    CopyObject
    Copy object and all of its subobjects.

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    CopyObjectWithoutSubobjects
    Same as CopyObject() except no subobjects are copied.

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

    場所:

    パラメータ:

    詳細と仮定

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string srcfile$="/data/cb_data/cb_tm.rvc";
    string destfile$="/data/cb_data/temp.rvc";
    CopyObjectWithoutSubobjects(srcfile$, 1, destfile$, 1);
    


    CreateProjectFile
    Create a project file

    CreateProjectFile(filename$, description$)

    場所:

    パラメータ:

    戻り値

    作成日時: 02-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

    DeleteObject(filename$, objectnumber)

    場所:

    パラメータ:

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string fileName$="/data/cb_data/cb_tm.rvc";
    DeleteObject(fileName$, 1);
    


    FindInvalidObjects
    Search the rvc file for invalid objects

    FindInvalidObjects(filename$, doSubLevels, invalidList, singletonList)

    場所:

    パラメータ:

    戻り値

    作成日時: 20-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    proc printErrors(string file$, class STRINGLIST invalid, class STRINGLIST singleton)
    {
           print(file$);
           numeric numInvalid = invalid.GetNumItems();
           numeric numSingle = singleton.GetNumItems();
           numeric i=0;
           if (numInvalid > 0)
           {
                  print("INVALID:");
                  for (i=0; i 0)
           {
                  print("DUPLICATES:");
                  for (i=0; i


    GetAllObjectNames
    Get a list of all the object names in an RVC file

    GetAllObjectNames(filename$, type$, parent, notype, nopath)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        Object filename
      string type$ (オプション)
        Object Type to filter for
        可能性のある値:
          "All"
            All objects
          "Raster"
            Raster object
          "Vector"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "Folder"
            Folder
          "Style"
            Style object
      numeric parent (オプション)
        Parent object number (default is file)
      numeric notype (オプション)
        If 1 the return value does not include the object types. The default is 0.
      numeric nopath (オプション)
        If 1 the return value only has object name, not object path. The default is 1.

    戻り値

    作成日時: 09-Apr-2002
    修正日時: 22-Apr-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class STRINGLIST objnames;
    objnames = GetAllObjectNames("c:/data/cb_data/cb_elev.rvc","Raster");
    numeric i;
    for i=0 to objnames.GetNumItems()-1 {
           print (objnames.GetString(i));
           }
    


    GetAllObjectNumbers
    Determines if object exists in project file

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

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string containing path and filename of the RVC file.
      array array
        Array to store the object numbers in.
      string object$ (オプション)
        Object Type to filter for
        可能性のある値:
          "All"
            All objects
          "Raster"
            Raster object
          "Vector"
            Vector object
          "CAD"
            CAD object
          "TIN"
            TIN object
          "SML"
            SML object
          "Folder"
            Folder
          "Style"
            Style object
      numeric parent (オプション)
        Parent object number (optional - if omitted, will assume main level objects

    戻り値

      numeric
      Number of object numbers in array.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    array numeric objnums[10];
    numeric max = GetAllObjectNumbers("c:/data/cb_data/cb_elev.rvc",objnums,"Raster");
    print(max);
    numeric i;
    for i=1 to max {
           print (objnums[i]);
           }
    


    GetObjectDescription
    Gets the description of an object by object number

    GetObjectDescription(filename$, objectnumber)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric objectnumber
        A valid object number

    戻り値

      string
      a string containing the name of the object, or "" if
      object not found

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string fileName$="/data/cb_data/cb_tm.rvc";
    GetObjectDescription(fileName$, 1);
    


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

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

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        A valid vector, CAD, raster, or TIN object
      numeric variable xMin
        Minimum x value returned
      numeric variable yMin
        Minimum y value returned
      numeric variable xMax
        Maximum x value returned
      numeric variable yMax
        Maximum y value returned
      class GEOREF georef (オプション)
        Optional - georef object (if not used values will be
        in object coordinates)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V; # vector object
    class Georef vGeoref;
    GetInputVector(V);
    numeric xMin, yMin, xMax, yMax;
    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
    Get the extents of an object as a region

    GetObjectExtentsRegion(Object, georef)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        A valid (Vector, CAD, Raster, or TIN object)
      class GEOREF georef (オプション)
        Optional georef object - if not used values will be in object coordinates

    戻り値

    作成日時: 16-Feb-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    region reg;
    class Georef georef;
    GetInputRaster(R);
    georef = GetLastUsedGeorefObject(R);
    reg = GetObjectExtentsRegion(R, georef);
    SaveRegion(reg, R.$Info.Filename, "region", R.$Info.Name + " extents region");
    


    GetObjectFileName
    Returns the path qualified RVC file name for an object.

    GetObjectFileName(Object)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The afore-mentioned object

    戻り値

      string
      A string containing the path plus filename.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster Rin;
    vector Vin;
    tin TinIn;
    string str$;
    numeric objNum;
    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(TinIn);
    # get the RVC file name
    str$ = GetObjectFileName(TinIn);
    objNum = GetObjectNumber(TinIn);
    print("TIN Object Number: ", objNum, "RVC file Name: ", str$);
    


    GetObjectName
    Gets the name of an object by object number

    GetObjectName(filename$, objectnumber)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric objectnumber
        A valid object number

    戻り値

      string
      a string containing the name of the object, or "" if object not found

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string fileName$="c:/data/cb_data/cb_tm.rvc";
    GetObjectName(fileName$, 1);
    


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

    GetObjectNumber(inObject)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD inObject
        The Object

    詳細と仮定

      The object exists.

    戻り値

      numeric
      The object number.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    string fileName$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    SetObjectDescription(fileName$, objectNumber, "A New Description");
    


    GetObjectSize
    Get the number of bytes in an object

    GetObjectSize(Object)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The object

    戻り値

      numeric

    作成日時: 18-Dec-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

    GetObjectZExtents(Object, zMin, zMax)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        A valid CAD, TIN, or vector object
      numeric variable zMin (オプション)
        Minimum z value returned
      numeric variable zMax (オプション)
        Maximum z value returned

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    MakeRVCFolder
    Creates a folder in an RVC project.

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

    場所:

      オブジェクト

    パラメータ:

      string filename$
        RVC project filename.
      string foldername$
        Name of folder to be created.
      string description$
        Description of folder.
      string parentfolder$ (オプション)
        (optional)
        Name of parent folder for creating a folder in a folder.

    戻り値

      なし

    作成日時: 20-Jul-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    MakeRVCFolder("c:/tnt/testdata.rvc","NewFolder","A new folder","Users");
    


    ObjectExists
    Determines if object exists in project file

    ObjectExists(filename$, objectname$, type$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string containing path and filename
      string objectname$
        A string containing objects name
      string type$ (オプション)
        The object type (the default is "all")

    詳細と仮定

      A blank object name ("") is used to determine if ANY objects of
      the given type exist.

    戻り値

      numeric
      1 if it exists, 0 if it doesn't

    作成日時: 24-Jun-1999
    修正日時: 28-Jan-2004
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string file$="c:/data/sf_data/haywsoil";
    string ob$="hsoils";
    if (ObjectExists(file$, ob$)) then
           print("Object", ob$, "Exists in", file$);
    else
           print("Object", ob$, "Does not exist in", file$);
    


    ObjectNumber
    Returns an object number used by several object and display functions

    ObjectNumber(filename$, objectname$, type$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      string objectname$
        A string indicating name of object
      string type$
        - object type (see below)
        "FILE", File type
        "FOLDER", An object to contain other objects
        "RASTER", Raster object
        "VECTOR", VECTOR object
        "CAD", CAD object
        "DBASE", General/raster database
        "STYLE", Drawing style object
        "QUERY", Generic database query string
        "FILTER", Spatial filter description
        "VIDSEQ", Ref for sequence of frames on video disk
        "GEOREF", Georeference object
        "PAGELT", Information for page layouts
        "HYPER", Database referenced by HyperIndex
        "DBFORM", Database display layout
        "TPOINT", Tie point list
        "HISTO", Histogram object
        "CONTAB", Contrasting table
        "2DHIST", Information about 2-D histogram
        "COLMAP", Color table for rasters
        "RDBASE", Db record list for rasters
        "FPROC", Information to match frequency-domain rasters
        "RTREND", Trend Information
        "SPOTHR", Header (leader) file from SPOT tape
        "CAMERA", Camera calibration information
        "PTDBAS", Db record list for point elements
        "LDBASE", Db record list for line elements
        "PDBASE", Db record list for polygon elements
        "NDBASE", Db record list for node elements
        "CDBASE", Db record list for CAD object
        "COLBAL", Printer color balance
        "PRTDEF", Description for raster printer devices
        "PLOTDF", Description for pen plotter devices
        "OFONT", Outline (stroke) font
        "GENREF", Generic reference object, not user-viewable object
        "SCANRF", Description for scanners
        "XYDIG", Description for XY digitizer devices
        "D2DGRP", Display group layout information
        "D2DWIN", Display window layout information
        "TIN", TIN object
        "DPARM", Display parameter structure
        "LEGEND", Legend object
        "TEXT", Generic Text Object
        "TDBASE", Database for TIN objects
        "VDBASE", Database for vector objects
        "REGION", REGION object
        "ASSOC", External file association object
        "QTREE", Search Quad Tree object
        "DBPARM", Database parameters object
        "THEME", Theme Mapping parameters object
        "METADT", Metadata object - text
        "TABLE", Table OTYPE tag for databases
        "INVDBL", Database table to element lists
        "EDPARM", Object Editor parameter structure
        "DLAYOT", Display layout information
        "SML", Stand-alone SML Script
        "SPECT", Spectral object
        "RASTST", Raster Set object
        "SENSOR", Sensor calibration information for spectral bands
        "DSIM3D", Display 3D simulation parameters object
        "HYPSPC", HyperSpectral object
        "DBCONS", Database table constraint information

    詳細と仮定

      returns 0 if no valid object found

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string fileName$="/data/cb_data/cb_tm.rvc";
    string obname$="TM_2";
    numeric objectNumber=ObjectNumber(fileName$, obname$, "raster");
    GetObjectDescription(fileName$, objectNumber);
    


    OpenStyleObject
    Open a style object

    OpenStyleObject(filename$, objectname$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        RVC file name
      string objectname$
        Style object name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    OpenStyleSubObject
    Open a style subobject

    OpenStyleSubObject(Object)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        Style object

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    PackRVC
    Compresses the rvc file eliminating unused space

    PackRVC(filename$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        The rvc file to compress

    戻り値

      numeric

    作成日時: 06-Feb-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ReadMetaData
    Returns an object's metadata as a string

    ReadMetaData(Object)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The Object

    戻り値

      string

    作成日時: 05-Jan-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector V;
    GetInputVector(V);
    WriteMetaData(V, "Some importantant Information about this Vector object");
    string metadata$ = ReadMetaData(V);
    print(metadata$);
    


    RecoverProjectFile
    Recover project file copying to a new file

    RecoverProjectFile(infilename$, outfilename$, outfiledesc$, log$)

    場所:

      オブジェクト

    パラメータ:

      string infilename$
        The source file to copy from
      string outfilename$
        The destination file to copy to (must be a new file)
      string outfiledesc$
        The output file description
      string log$
        Log of actions performed by the recover process

    戻り値

      numeric

    作成日時: 24-May-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string infile$ = GetInputFileName("", "Select File to perform recovery on:", ".rvc");
    string outfile$ = "C:/cleaned/cb_soils.rvc";
    string desc$ = "desc";
    class FILE logFile;
    string log$;
    logFile = fopen("C:/log.txt", "w");
    numeric err = RecoverProjectFile(infile$, outfile$, desc$, log$);
    print(err);
    fwritestring(logFile, log$);
    


    SetObjectDescription
    Changes the description of an object

    SetObjectDescription(filename$, objectnumber, string$)

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric objectnumber
        A valid object number
      string string$
        A string indicating the new object description

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    string fileName$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    SetObjectDescription(fileName$, objectNumber, "A New Description");
    


    SetObjectName
    Change the object name of an existing object

    SetObjectName(Object, NewName$)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The object to change
      string NewName$
        The new object name

    戻り値

      なし

    作成日時: 15-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


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

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

    場所:

      オブジェクト

    パラメータ:

      string filename$
        A string indicating path and project name
      numeric parentobjectnumber
        A valid object number
      string objectname$
        A string indicating name of subobject (pass "*" to get the last used subobject)
      string type$
        - object type (see below)
        "FILE", File type
        "FOLDER", An object to contain other objects
        "RASTER", Raster object
        "VECTOR", VECTOR object
        "CAD", CAD object
        "DBASE", General/raster database
        "STYLE", Drawing style object
        "QUERY", Generic database query string
        "FILTER", Spatial filter description
        "VIDSEQ", Ref for sequence of frames on video disk
        "GEOREF", Georeference object
        "PAGELT", Information for page layouts
        "HYPER", Database referenced by HyperIndex
        "DBFORM", Database display layout
        "TPOINT", Tie point list
        "HISTO", Histogram object
        "CONTAB", Contrasting table
        "2DHIST", Information about 2-D histogram
        "COLMAP", Color table for rasters
        "RDBASE", DB record list for rasters
        "FPROC", Information to match frequency-domain rasters
        "RTREND", Trend Information
        "SPOTHR", Header (leader) file from SPOT tape
        "CAMERA", Camera calibration information
        "PTDBAS", DB record list for point elements
        "LDBASE", DB record list for line elements
        "PDBASE", DB record list for polygon elements
        "NDBASE", DB record list for node elements
        "CDBASE", DB record list for CAD object
        "COLBAL", Printer color balance
        "PRTDEF", Description for raster printer devices
        "PLOTDF", Description for pen plotter devices
        "OFONT", Outline (stroke) font
        "GENREF", Generic reference object, not user-viewable object
        "SCANRF", Description for scanners
        "XYDIG", Description for XY digitizer devices
        "D2DGRP", Display group layout information
        "D2DWIN", Display window layout information
        "TIN", TIN object
        "DPARM", Display parameter structure
        "LEGEND", Legend object
        "TEXT", Generic Text Object
        "TDBASE", Database for TIN objects
        "VDBASE", Database for vector objects
        "REGION", REGION object
        "ASSOC", External file association object
        "QTREE", Search Quad Tree object
        "DBPARM", Database parameters object
        "THEME", Theme Mapping parameters object
        "METADT", Metadata object - text
        "TABLE", Table OTYPE tag for databases
        "INVDBL", Database table to element lists
        "EDPARM", Object Editor parameter structure
        "DLAYOT", Display layout information
        "SML", Stand-alone SML Script
        "SPECT", Spectral object
        "RASTST", Raster Set object
        "SENSOR", Sensor calibration information for spectral bands
        "DSIM3D", Display 3D simulation parameters object
        "HYPSPC", HyperSpectral object

    詳細と仮定

      Useful for finding subobjects like histograms and
      georeference objects.

    戻り値

      numeric
      a number indicating the object number, or a negative number if
      no such object

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    GetInputRaster(R);
    string fileName$=R.$Info.Filename;
    numeric objectNumber=GetObjectNumber(R);
    numeric subobjectNumber=SubObjectNumber(fileName$, objectNumber,"HISTOGRAM","HISTO");
    #DeleteObject(fileName$, subobjectNumber); # delete histogram
    print(subobjectNumber);
    


    WriteMetaData
    Writes metadata to an object

    WriteMetaData(Object, metaData$)

    場所:

      オブジェクト

    パラメータ:

      Raster, Vector or CAD Object
        The Object
      string metaData$
        The contents of the meta data to write

    戻り値

      なし

    作成日時: 05-Jan-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    Vector V;
    GetInputVector(V);
    WriteMetaData(V, "Some importantant Information about this Vector object");
    string metadata$ = ReadMetaData(V);
    print(metadata$);
    


    AddMatrix(matOut, matLeft, matRight)

    場所:

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matLeft
        The matrix to add
      class MATRIX matRight
        The matrix to add

    詳細と仮定

      All matrices have been created with CreateMatrix()
      and have not destroyed.
      All matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1, h2, h3;
    h1 = CreateMatrix(2, 2); # create three matrices
    h2 = CreateMatrix(2, 2);
    h3 = CreateMatrix(2, 2);
    # fill the matrices with some values
    numeric r,c,a;
    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
    Adds scalar to each element of a matrix

    AddMatrixScaler(matrix, value)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        The output matrix returned
      numeric value
        The scalar value to add to each element

    詳細と仮定

      The matrix has been created with CreateMatrix() and not destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    numeric r,c,a;
    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
    Creates a matrix - returns a valid matrix handle

    CreateMatrix(numRows, numCols)

    場所:

      マトリックス

    パラメータ:

      numeric numRows
        The row size of the matrix to create
      numeric numCols
        The column size of the matrix to create

    詳細と仮定

      This function must be called before any other
      functions that take matrices as input.

    戻り値

      class MATRIX
      A valid matrix handle

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    numeric r,c,a;
    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
    Destroys a previously created matrix

    DestroyMatrix(matrix)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle

    詳細と仮定

      The matrix has been created with CreateMatrix() and
      not previously destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    numeric r,c,a;
    # 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
    Returns the number of columns in a matrix

    GetMatrixColSize(matrix)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle

    詳細と仮定

      The matrix has been created with CreateMatrix() and
      not previously destroyed.

    戻り値

      numeric
      The number of columns in the matrix.

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # 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(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of code
    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r, c;
    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
    Returns value of matrix element

    GetMatrixItem(matrix, row, col)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle
      numeric row
        The row number
      numeric col
        The column number

    詳細と仮定

      The matrix has been created with CreateMatrix() and
      not previously destroyed.

    戻り値

      numeric
      Value of matrix[row, column]

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # 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(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of code
    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r, c;
    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);
    


    GetMatrixRowSize
    Returns the number of rows in a matrix

    GetMatrixRowSize(matrix)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle

    詳細と仮定

      The matrix has been created with CreateMatrix() and
      not previously destroyed.

    戻り値

      numeric
      The number of columns in the matrix.

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # 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(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of code
    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r, c;
    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);
    


    InvertMatrix
    Inverts a matrix

    InvertMatrix(matOut, matIn)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The inverse of the input matrix
      class MATRIX matIn
        The matrix to invert

    詳細と仮定

      The matrices have been created with CreateMatrix() and
      have not destroyed.
      The matrices are the same size and the input matrix
      has an inverse.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # 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(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of program
    clear();
    class MATRIX h1, h2, h3;
    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
    Multiplies two matrices - (matrixOut = matrixLeft * matrixRight)

    MultiplyMatrix(matOut, matLeft, matRight)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matLeft
        The matrix to premultiply with
      class MATRIX matRight
        The matrix to post multiply with

    詳細と仮定

      All matrices have been created with CreateMatrix() and
      have not been destroyed.
      All matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # 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(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of program
    clear();
    class MATRIX h1, h2, h3;
    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
    Multiplies each element of a matrix by a scaler

    MultiplyMatrixScaler(matrix, value)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        The output matrix returned
      numeric value
        The scaler value to multiply each element by

    詳細と仮定

      The matrix has been created with CreateMatrix() and not destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    h1 = CreateMatrix(2, 2); # create a matrix
    # fill the matrix with some values
    numeric r,c,a;
    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
    Sets the element of a matrix to a value.

    SetMatrixItem(matrix, row, col, value)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matrix
        A valid matrix handle
      numeric row
        The row number
      numeric col
        The column number
      numeric value
        The value to set the element to

    詳細と仮定

      The matrix has been created with CreateMatrix() and
      not previously destroyed.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1;
    numeric r,c,a;
    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
    Subtracts two matrices - (matrixOut = matrixLeft - matrixRight)

    SubMatrix(matOut, matLeft, matRight)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matLeft
        The matrix to subtract from
      class MATRIX matRight
        The matrix to subtract

    詳細と仮定

      All matrices have been created with CreateMatrix() and
      have not been destroyed.
      All matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MATRIX h1, h2, h3;
    h1 = CreateMatrix(2, 2); # create three matrices
    h2 = CreateMatrix(2, 2);
    h3 = CreateMatrix(2, 2);
    # fill the matrices with some values
    numeric r,c,a;
    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
    Transposes rows and columns of a matrix

    TransposeMatrix(matOut, matIn)

    場所:

      マトリックス

    パラメータ:

      class MATRIX matOut
        The output matrix returned
      class MATRIX matIn
        The matrix to transpose

    詳細と仮定

      The matrices have been created with CreateMatrix() and
      have not destroyed. The matrices are the same size.

    戻り値

      なし

    作成日時: 20-Oct-1997
    修正日時: 08-Mar-1999
    TNTsml for Windows で使用可能: はい

    例:

    #
    # 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(class MATRIX matHandle, string formatStr$)
    {
           # get the size of the matrix
           numeric lastRow = GetMatrixRowSize(matHandle) - 1;
           numeric lastCol = GetMatrixColSize(matHandle) - 1;
           numeric row, col;
           for row = 0 to lastRow
           {
                  for col = 0 to lastCol
                  {
                         printf(formatStr$, GetMatrixItem(matHandle, row, col));
                  }
                  print();
           }
           print(); # print blank line after matrix output
    }
    # start of program
    clear();
    class MATRIX h1, h2;
    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);
    


    CopyGeorefToObject(Object, georef)

    場所:

    パラメータ:

    詳細と仮定

      When copying a georef to a vector object which has been opened for
      Vector Toolkit, you need to close the vector before copying the
      georef.
      This function is used to specify that a vector, CAD or TIN has
      a particular implied georeference. Don't try to use it with a
      raster - it won't work. Rasters can't have implied georeferences.
      If you just want to copy a georeference, use CopySubobjects()
      instead.

    戻り値

      なし

    作成日時: 18-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    vector V1, V2, Vmerge;
    GetInputVector(V1);
    GetInputVector(V2);
    GetOutputVector(Vmerge);
    Vmerge = VectMerge(V1, V2);
    # get georef for merge
    class Georef georef;
    georef = GetLastUsedGeorefObject(V1);
    CopyGeorefToObject(Vmerge, georef);
    


    CreateControlPointGeoref
    Creates a control point georeference object.

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid (raster, vector, CAD, or TIN object
      numeric numberPoints
        Number of control points
      array xSource
        One dimensional array of source x coordinates
      array ySource
        One dimensional array of source y coordinates
      array zSource
        One dimensional array of source z coordinates
      array xDestination
        One dimensional array of destination x coordinates
      array yDestination
        One dimensional array of destination y coordinates
      array zDestination (オプション)
        One dimensional array of destination z coordinates
      array xSourceAccuracy (オプション)
        Optional - one dimensional array of source x accuracy
      array ySourceAccuracy (オプション)
        Optional - one dimensional array of source y accuracy
      array zSourceAccuracy (オプション)
        Optional - one dimensional array of source z accuracy
      array xDestinationAccuracy (オプション)
        Optional - one dimensional array of destination x accuracy
      array yDestinationAccuracy (オプション)
        Optional - one dimensional array of destination y accuracy
      array zDestinationAccuracy (オプション)
        Optional - one dimensional array of destination z accuracy
      class SR_COORDREFSYS refsys (オプション)
        The coordinate reference system

    詳細と仮定

      You must have a minumum of three non-collinear points

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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 numeric xsrc[5], ysrc[5], zsrc[5];
    # the destination arrays will hold the appropriate,
    # (georeferenced), values
    array numeric xdest[5], ydest[5], zdest[5];
    # arrays to hold vector points to draw box
    array numeric xpoints[10];
    array numeric 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();
    raster Rin;
    vector Vout;
    class Georef rgeoref;
    # get the raster and vector
    GetInputRaster(Rin);
    # get number of lines and columns
    numeric numlines = NumLins(Rin);
    numeric numcols = NumCols(Rin);
    # get the upper left (UL), lower right (LR)
    # upper right (UR), and lower left (LL) coordinates
    numeric xUL, yUL, xLR, yLR, xUR, yUR, xLL, yLL;
    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
    # 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
    numeric i;
    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
    numeric numberPoints = 4;
    # now create the georef via dialog
    CreateControlPointGeoref(Vout, numberPoints, xsrc, ysrc, zsrc, xdest, ydest, zdest);
    GeorefFree(rgeoref); # clean up
    CloseRaster(Rin);
    


    CreateControlPointGeorefDefaultAccuracy
    Same as CreateControlPointGeoref but without accuracy parameters

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Raster, Vector, CAD, or TIN object
      class SR_COORDREFSYS refsys
        The coordinate reference system
      numeric numberPoints
        Number of control points
      array xSource
        One dimensional array of source x coordinates
      array ySource
        One dimensional array of source y coordinates
      array xDestination
        One dimensional array of destination x coordinates
      array yDestination
        One dimensional array of destination y coordinates
      array zDestination (オプション)
        One dimensional array of destination z coordinates

    戻り値

    作成日時: 16-May-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/import_srtm.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


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

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Raster, Vector, CAD, or TIN object
      class GEOREF georef
        The georeference to use for projection system parmameters
      numeric numberPoints
        Number of control points
      array xSource
        One dimensional array of source x coordinates
      array ySource
        One dimensional array of source y coordinates
      array zSource
        One dimensional array of source z coordinates
      array xDestination
        One dimensional array of destination x coordinates
      array yDestination
        One dimensional array of destination y coordinates
      array zDestination (オプション)
        One dimensional array of destination z coordinates
      array xSourceAccuracy (オプション)
        Optional - one dimensional array of source x accuracy
      array ySourceAccuracy (オプション)
        Optional - one dimensional array of source y accuracy
      array zSourceAccuracy (オプション)
        Optional - one dimensional array of source z accuracy
      array xDestinationAccuracy (オプション)
        Optional - one dimensional array of destination x accuracy
      array yDestinationAccuracy (オプション)
        Optional - one dimensional array of destination y accuracy
      array zDestinationAccuracy (オプション)
        Optional - one dimensional array of destination z accuracy

    詳細と仮定

      You must have a minumum of three non-collinear points

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster Rin, Rnew;
    class Georef geoOrg, geoNew;
    array numeric xsrc[5], ysrc[5], zsrc[5];
    array numeric xdest[5], ydest[5], zdest[5];
    # 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
    numeric r, c;
    for r = 1 to 200 {
           for c = 1 to 200 {
                  Rnew[r,c] = Rin[r,c];
                  }
           }
    # get number of lines and columns
    numeric numlines, numcols;
    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
    numeric xUL, yUL, xLR, yLR, xUR, yUR, xLL, yLL;
    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
    numeric i;
    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
    numeric 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
    Create an implied georeference subobject

    CreateImpliedGeoref(Object, refsys)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Vector, CAD, or TIN object
      class SR_COORDREFSYS refsys
        The coordinate reference system

    戻り値

      numeric

    作成日時: 16-May-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class MAPPROJ mapproj;
    vector V;
    # set projection parameters
    mapproj.SetSystemLatLon();
    mapproj.Datum = "World Geodetic System 1984";
    GetInputVector(V);
    CreateImpliedGeoref(V, mapproj);
    


    CreateSimpleGeoref
    Create simple raster georeference

    CreateSimpleGeoref(raster, refSys, refCoord, lineScale, columnScale, referencePoint$, orientation$, angle)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster raster
        The raster object to georeference
      class SR_COORDREFSYS refSys
        Coordinate Reference System
      class POINT2D refCoord
        The reference coordinate location
      numeric lineScale
        Cell size setting for line scale
      numeric columnScale
        Cell size setting for column scale
      string referencePoint$ (オプション)
        The position of the reference point (Upper Left by default)
        可能性のある値:
          "UpperLeft"
          "UpperRight"
          "LowerLeft"
          "LowerRight"
          "Center"
      string orientation$ (オプション)
        The orientation of the raster (Projection Upright by default)
        可能性のある値:
          "Upright"
          "UpsideDown"
          "TopToLeft"
          "TopToRight"
          "UserDefined"
      numeric angle (オプション)
        The angle to use for User-defined orientation

    戻り値

      numeric

    作成日時: 08-Nov-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster src, dest;
    class RVC_GEOREFERENCE georef;
    class SR_COORDREFSYS refsys;
    class POINT2D refCoord;
    GetInputRaster(src);
    GetInputRaster(dest);
    georef.OpenLastUsed(src);
    refsys = georef.GetCoordRefSys();
    refCoord.x = 333349.501;              # Use values and units appropriate for the coord ref sys
    refCoord.y = 162833.442;
    # Create Simple Georeference (the last two are defaults)
    numeric err = CreateSimpleGeoref(dest, refsys, refCoord, LinScale(src), ColScale(src), "UpperLeft", "Upright");
    PopupError(err);
    


    GeorefAlloc
    Allocate a new georeference handle

    GeorefAlloc()

    場所:

      ジオリファレンス(座標付与)

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Georef geonum1, geonum2;
    geonum1 = GeorefAlloc();
    geonum2 = GeorefAlloc();
    GeorefFree(geonum1);
    GeorefFree(geonum2);
    


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

    GeorefAngleToNorth(georef, x, y)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Georeference object obtained from a previous
        GetGeorefObject() call
      numeric x
        Horizontal coordinate of point of interest
      numeric y
        Vertical coordinate of point of interest

    詳細と仮定

      The center of the (vector or raster) object is
      determined from the georeferenced extent of the object.

    戻り値

      numeric
      a number in radians

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    GeorefFree
    Free georeference object

    GeorefFree(georef)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Class Georef from a previous call to GetGeorefObject() or GeorefAlloc()

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Georef gref;
    gref = GeorefAlloc();
    GeorefFree(gref);
    


    GeorefGetParms
    Open dialog for selecting georeference subobject

    GeorefGetParms(georef)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class Georef georef (オプション)
        Class Georef from previous call to GetGeorefObject()

    戻り値

      class Georef
      a copy of the selected georeference subobject, or a new one if
      no parameter was specified (with parms as entered in the popup dialog)

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class Georef g, h;
    raster R;
    GetInputRaster(R); # get input raster
    g = GetGeorefObject(R); # get georeference of object
    h = GeorefGetParms(g); # display the georef parms and copy to 'h'
    GeorefFree(g);
    GeorefFree(h);
    CloseRaster(R);
    


    GeorefSetCoordRefSys
    Set the coordinate reference system for this georeference

    GeorefSetCoordRefSys(georef, refsys)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        The georeference to use
      class SR_COORDREFSYS refsys
        The coordinate reference system

    戻り値

      なし

    作成日時: 25-Jun-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GeorefSetProjection
    Set the projection of a Georef

    GeorefSetProjection(georef, projection)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Georeference to set
      class MAPPROJ projection
        Map projection to set

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


    GeorefTrans
    Transform point from one map projection to another

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF from_georef
        The original georeference object
      numeric from_x
        The x coordinate of the point of interest, as
        it exists in the original georeference system
      numeric from_y
        The y coordinate in the original georeference system
      class GEOREF to_georef
        The target georeference object
      numeric variable to_x
        The x coordinate of the point of interest, as
        it exists in the target georeference system
      numeric variable to_y
        The y coordinate in the target georeference system

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    GetGeorefObject
    Return a handle to the georeference subobject

    GetGeorefObject(Object)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Vector or Raster Object

    戻り値

      class Georef
      georeference subobject of object parameter

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    GetLastUsedGeorefObject
    Return the most recently used georeference subobject

    GetLastUsedGeorefObject(Object)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid Vector or Raster object

    詳細と仮定

      Instead of prompting the user for a new georeference, the most recently used georeference is automatically used.

    戻り値

      class GEOREF
      georef object or 0 if not found

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    MapToObject
    Transform georeferenced location from map coordinates to object coordinates

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class GEOREF georef
        Georeference object
      numeric map_x
        The x coordinate of the point of interest, as it exists
        in the georeferenced map coordinate system
      numeric map_y
        The y coordinate in the map coordinate system
      Raster, Vector or CAD Object
        A valid vector or raster object
      numeric variable x (オプション)
        The coordinates of the point of interest, as it exists
        relative to the origin of the object
      numeric variable y (オプション)
        The y coordinate relative to the object origin

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    ObjectToMap
    Transform object coordinates to georeferenced location

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        A valid vector or raster object
      numeric x
        The coordinates of the point of interest, as
        it exists relative to the origin of the object
      numeric y
        The y coordinate relative to the object origin
      class GEOREF georef
        A georeference object
      numeric variable map_x (オプション)
        The coordinates of the point of interest, as it
        exists in the georeferenced map coordinate system
      numeric variable map_y (オプション)
        The y coordinate in the map coordinate system

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    raster R;
    class Georef g;
    numeric x1, y1, x2, y2;
    GetInputRaster(R);
    g=GetGeorefObject(R);
    print("Enter object coord x1.");
           x1=input();
    print("Enter object coord y1.");
           y1=input();
    ObjectToMap(R, x1, y1, g, x2, y2);
    print("Object: ", x1,y1);
    print("/nMap: ", x2, y2);
    GeorefFree(g);
    CloseRaster(R);
    


    ProjDistanceToMeters
    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).

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class SR_COORDREFSYS refsys
        The coordinate reference system
      numeric x1
        X coordinate of point 1
      numeric y1
        Y coordinate of point 1
      numeric x2
        X coordinate of point 2
      numeric y2
        Y coordinate of point 2

    戻り値

      numeric

    作成日時: 09-Jan-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class MAPPROJ mapproj;
    mapproj.SetSystemLatLon();
    class POINT2D la;
    la.x = -118;
    la.y = 33.5;
    class POINT2D ny;
    ny.x = -73.5;
    ny.y = 41;
    print(ProjDistanceToMeters(mapproj, la.x, la.y, ny.x, ny.y) / 1000, "km");
    


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

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        The Object the georeference is attached to
      array xSource
        Source x positions returned
      array ySource
        Source y positions returned
      array zSource
        Source z positions returned
      array xDestination
        Destination x positions returned
      array yDestination
        Destination y positions returned
      array zDestination
        Destination z positions returned

    詳細と仮定

      the Object has a control point georeference

    戻り値

      numeric
      number of control points read

    作成日時: 07-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    TransPoint2D
    Transform 2D point using transparm

    TransPoint2D(point, transparm, invert)

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      class POINT2D point
        The point to transform
      class TransParm transparm
        Transparm to use
      numeric invert (オプション)
        Do inverse

    戻り値

    作成日時: 22-May-1998
    修正日時: 22-May-1998
    TNTsml for Windows で使用可能: はい

    例:

    ######################
    #
    # ORBITSP.SML
    #
    # Demonstration of movie generation from 3D display using spiral 
    # orbit path. Both 2D and 3D views are copied into each movie frame.
    #
    # View center is fixed at center of group.  Viewer position is computed
    # from size of group.  Two complete orbits are made.  The first starts
    # beyond the edge of group and spirals inward and downward; the second
    # spirals outward and upward.
    #
    # Script uses an input DEM for the surface layer, an input raster drape
    # layer, and an input vector drape layer.
    #
    # Requires TNTmips Version 6.5
    #
    #####################
    clear();
    #### Set movie format, frame rate, and recording time
    # Movie format (Possible values : "MPEG"(All platform) or "AVI"(Windows only) 
    string format$;
    format$ = "AVI";
    # Frame rate 
    # Possible values : 
    #   "MOVIE_FRAMERATE_23_976"  23.976 (24000/1001) fps - NTSC encapsulated film rate
    #   "MOVIE_FRAMERATE_24"              24 fps - Standard international cinema film rate
    #   "MOVIE_FRAMERATE_25"       25 fps - PAL (625/50) video frame rate
    #   "MOVIE_FRAMERATE_29_970"  29.97 (30000/1001) fps - NTSC video frame rate
    #   "MOVIE_FRAMERATE_30"       30 fps - NTSC drop-frame (525/60) video frame rate
    #   "MOVIE_FRAMERATE_50"       50 fps - Double frame rate / progressive PAL
    #   "MOVIE_FRAMERATE_59_940"  59.94 (60000/1001) fps - Double frame rate NTSC
    #   "MOVIE_FRAMERATE_60"       60 fps - Double frame rate drop-frame NTSC
    string framerate$;
    framerate$ = "MOVIE_FRAMERATE_24";
    # Recording time
    numeric time;
    time = 60;
    ###### Get RVC objects to load
    raster Surface, RastDrape;
    vector VectDrape;
    print("Select raster to use for surface");
    GetInputRaster(Surface);
    print("Select raster to use for first drape layer");
    GetInputRaster(RastDrape);
    print("Select vector to use for second drape layer");
    GetInputVector(VectDrape);
    ###### RVC style object to draw center point and viewer point
    string styleFilename$;
    string styleObjectname$;
    GetInputObject("Style","Select style object for center and viewer point symbols:", 
           styleFilename$, styleObjectname$);
    string viewer$;
    viewer$ = "VIEWER";
    string center$;
    center$ = "CENTER";
    ######## Create display group with 2d and 3d views
    print("START");
    # Size of squared 2D view and 3D view
    # Should be evenly divisible by 8
    numeric size;
    size = 400;
    # Zoom out factor for 2D view
    numeric zoomfactor;
    zoomfactor = 1.8;
    # Create group
    print("Creating Group");
    class GRE_GROUP group;
    group = GroupCreate();
    # Create flags to create view without iconbar, scrollbars, status line and scale/position line
    # This is important to maintain fixed window size for movie generation
    string flags$;
    flags$ = "NoScalePosLine,NoIconBar,NoScrollbars,NoStatusLine";
    # Create dialog and 2D view
    print("Creating dialog and 2D view");
    class XmForm dialog2d;
    class GRE_VIEW view2d;
    dialog2d = CreateFormDialog("VIEW 2D");
    view2d = GroupCreateView(group,dialog2d,"",size,size,flags$);
    view2d.BackgroundColor.red = 67;
    view2d.BackgroundColor.green = 100;
    view2d.BackgroundColor.blue = 100;
    # Create dialog and 3D view
    print("Creating dialog and 3D view");
    class XmForm dialog3d;
    class GRE_VIEW3D view3d;
    dialog3d = CreateFormDialog("VIEW 3D");
    view3d = GroupCreate3DView(group,dialog3d,"",size,size,flags$);
    view3d.BackgroundColor.red = 67;
    view3d.BackgroundColor.green = 100;
    view3d.BackgroundColor.blue = 100;
    # Add layers to group
    GroupQuickAddRasterVar(group,Surface,1);
    GroupQuickAddRasterVar(group,RastDrape,0);
    GroupQuickAddVectorVar(group,VectDrape);
    # Open both views
    DialogOpen(dialog2d);
    DialogOpen(dialog3d);
    # Full redraw of both views
    ViewRedrawFull(view2d);
    ViewRedrawFull(view3d);
    ViewZoomOut(view2d,zoomfactor,1);
    ####### Set up parameters for movie frame
    # Destination of each view in final frame for movie 
    numeric x2d, y2d, x3d, y3d, w, h;
    x2d = 0;
    y2d = 0;
    x3d = size;
    y3d = 0;
    w = 2 * size;
    h = size;
    # Create text strings for annotation in frame
    string frameTitle$;
    string frameTitle2$;
    frameTitle$ = "Mount St. Helens Flow Hazard Zonation";
    frameTitle2$ = "and Survey Station Locations";
    # Font size
    numeric fontsize;
    fontsize = 16;
    # Define color for text annotation in frame
    class Color black;
    black.red = 0;
    black.green = 0;
    black.blue = 0;
    # Creating frame
    print("Creating frame for movie");
    class Frame frame;
    frame = FrameCreate(w,h);
    # Create graphics context (GC) for frame
    print("Creating GC from frame and activate it");
    ActivateGC(FrameCreateGC(frame));
    DrawTextSetHeightPixels(fontsize);
    DrawUseStyleObject(styleFilename$,styleObjectname$);
    ######## Set some more movie parameters
    # Initiale Movie
    print("Initializing Movie");
    class Movie movie;
    movie = MovieInit();
    # Check framerate and force it to "MOVIE_FRAMERATE_24" if it is invalid
    numeric rate;
    rate = 24;
    if (framerate$ == "MOVIE_FRAMERATE_23_976") rate = 23.976;
    if (framerate$ == "MOVIE_FRAMERATE_25") rate = 25.0;
    if (framerate$ == "MOVIE_FRAMERATE_29_970") rate = 29.970;
    if (framerate$ == "MOVIE_FRAMERATE_30") rate = 30.0;
    if (framerate$ == "MOVIE_FRAMERATE_50") rate = 50.0; 
    if (framerate$ == "MOVIE_FRAMERATE_59_940") rate = 59.940; 
    if (framerate$ == "MOVIE_FRAMERATE_60") rate = 60.0;
    if (rate == 24.0) framerate$ = "MOVIE_FRAMERATE_24";
    # Set Movie Parameters
    print("Setting Movie Parameters");
    MovieSetFormat(movie,format$);
    MovieSetFrameRate(movie,framerate$);
    MovieSetFrameWidth(movie,w);
    MovieSetFrameHeight(movie,h);
    # Make Output File
    string ext$;
    ext$ = MovieGetFileExt(movie);
    string filename$;
    filename$ = GetOutputFileName("","Make filename for movie",ext$);
    printf("Filename = %s\n",filename$);
    # Check recording time
    if (time <= 1.0) time = 1.0;
    ##### Get georeference for surface layer and reset to group projection
    class Georef georef;
    georef = GetLastUsedGeorefObject(Surface);
    GeorefSetProjection(georef,group.Projection);
    # Find map coordinates and surface elevation at center of group
    # and define as view point (center)
    class POINT3D center;
    center.x = group.Center.x;
    center.y = group.Center.y;
    numeric objx;
    numeric objy;
    MapToObject(georef,center.x,center.y,Surface,objx,objy);
    center.z = Surface[objy,objx];
    ##### Set up viewpoint and viewer position parameters
    class VIEWPOINT3D vp;
    vp = view3d.ViewPoint;
    vp.SetCenter(center);
    class POINT3D pt;                    # viewer position
    class POINT2D point;          # 2D point for location symbols
    # Set initial viewer position north of center just beyond group extents
    # and 10000 m higher than center point 
    pt.x = group.Center.x;
    pt.y = group.Extents.y2 + 0.6 * (group.Extents.y2 - group.Center.y);
    pt.z = center.z + 10000;
    vp.SetViewerPosition(pt);
    # Calculate spiral orbit parameters
    numeric numFrames = time * rate;
    numeric deltaAngle = -360.0 / numFrames * 2;
    numeric tx = vp.ViewPos.x - vp.CenterPoint.x;
    numeric ty = vp.ViewPos.y - vp.CenterPoint.y;
    numeric distance = 4 * sqrt(tx * tx + ty * ty) / 5 / numFrames * 2;
    numeric height = (vp.ViewPos.z - vp.CenterPoint.z) / numFrames * 2;
    ###### Start recording movie to file
    MovieStart(movie,filename$);
    # Loop for each frame
    numeric i, azimuth;
    for i = 1 to numFrames {
           SetStatusMessage(sprintf("Processing frame %d of %d",i,numFrames));
           # Rotate viewer position around center with deltaAngle increment
           vp.RotateViewerPosition(deltaAngle);
           if (i <= numFrames / 2) {
           # Move viewer position closer and higher to center point
                  azimuth = vp.AzimAngle * 180 / PI; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,90,height,"m");
                  }
           else {
           # Move viewer position farther and lower from center point
                  azimuth = vp.AzimAngle * 180 / PI + 180; # make it in degrees
                  vp.MoveViewerPosition(azimuth,0,distance,"m");
                  vp.MoveViewerPosition(0,-90,height,"m");
                  }
           # ViewRedrawDirect(view3d,"NoBlankScreen");
           # This new function    added after release of TNTmips 6.5
           # can redraw the view without blanking it first.  Use of
           # this function eliminates "flashing" of the view as the
           # movie is initially rendered.  It has no effect on the
           # output movie file.  For 6.5 release version, use the
           # function in the next statement.
           ViewRedraw(view3d);
           # Copy 2d view and 3d view to destination frame
           FrameCopyFromView(frame,view2d,0,0,size,size,x2d,y2d);
           FrameCopyFromView(frame,view3d,0,0,size,size,x3d,y3d);
           # Draw center point in 2d view
           point.x = vp.CenterPoint.x;
           point.y = vp.CenterPoint.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(center$);
           DrawPoint(point.x,point.y);
           # Draw viewer position point in 2d view
           point.x = vp.ViewPos.x;
           point.y = vp.ViewPos.y;
           point = TransPoint2D(point,ViewGetTransMapToView(view2d,group.Projection));
           point = TransPoint2D(point,ViewGetTransViewToScreen(view2d));
           DrawSetPointStyle(viewer$);
           DrawPoint(point.x,point.y);
           # Draw text to top of frame
           DrawTextSetColors(black);
           DrawTextSimple(frameTitle$,5,fontsize);
           DrawTextSimple(frameTitle2$,5,2.2*fontsize);
           # Add frame to movie
           MovieAddFrame(movie,frame);
    }                                                                            # End of main processing loop
    # Stop and Exit movie
    MovieStop(movie);
    MovieExit(movie);
    # Close dialogs
    DialogClose(dialog2d);
    DialogClose(dialog3d);
    print("END");
    


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

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

    場所:

      ジオリファレンス(座標付与)

    パラメータ:

      Raster, Vector or CAD Object
        The Object the georeference is attached to
      numeric numberPoints
        Number of control points to write
      array xSource
        Source x positions
      array ySource
        Source y positions
      array zSource
        Source z positions
      array xDestination
        Destination x positions
      array yDestination
        Destination y positions
      array zDestination
        Destination z positions

    詳細と仮定

      the Object has a control point georeference and the arrays
      are large enough to hold numberPoints numbers

    戻り値

      なし

    作成日時: 07-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    raster R;
    array numeric 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);
    


    ColorMapFromRastVar(raster, nameOrNum)

    場所:

    パラメータ:

      Raster raster
        Raster object
      any value nameOrNum (オプション)
        Which one if more than one available (default: last used)

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/deveg68.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapGetColor
    Get a color from a colormap

    ColorMapGetColor(colormap, index)

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The ColorMap
      numeric index
        What color index to get

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapSetColor
    Set a colormap color given a class color structure.

    ColorMapSetColor(colormap, index, color)

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The colormap to set
      numeric index
        Index of color to set
      class COLOR color
        The color structure to set the color with

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapSetColorHIS
    Set a colormap color to given HIS values.

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

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The colormap to set
      numeric index
        Index of color to set
      numeric hue
        Hue value
      numeric intensity
        Intensity value
      numeric saturation
        Saturation value

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/biomass.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapSetColorRGB
    Set a colormap color to given RGB values.

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

    場所:

      カラーパレット

    パラメータ:

      class COLORMAP colormap
        The colormap to set
      numeric index
        Index of color to set
      numeric red
        Red value
      numeric green
        Green value
      numeric blue
        Blue value
      numeric range (オプション)
        Sets the maximum value for red, green, blue

    詳細と仮定

      default range is 0 - 255

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/classifyRaster.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ColorMapWriteToRastVar
    Write a colormap under a raster.

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

    場所:

      カラーパレット

    パラメータ:

      Raster raster
        Raster object
      class COLORMAP colormap
        The colormap to write
      string name$
        The colormap object name
      string description$ (オプション)
        The colormap object description

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/deveg68.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    StyleReadBitmapPattern(style, name$)

    場所:

    パラメータ:

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadHatchPattern
    Read a hatch pattern from a style object

    StyleReadHatchPattern(style, name$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT style
        The style object to use
      string name$
        The hatch pattern name

    戻り値

    作成日時: 27-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    StyleReadLinePattern
    Read a LINEPATTERN from a style object

    StyleReadLinePattern(style, name$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT style
        A style object
      string name$
        The line pattern name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadLineStyle
    Read a line style from a style object

    StyleReadLineStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadPointStyle
    Read a point style from a style object

    StyleReadPointStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadPointSymbol
    Read a POINTSYMBOL from a style object

    StyleReadPointSymbol(style, name$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT style
        A style object
      string name$
        The point symbol name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadPolyStyle
    Read a polygon style from a style object

    StyleReadPolyStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    StyleReadTextStyle
    Read a text style from a style object

    StyleReadTextStyle(styleobj, stylename$)

    場所:

      スタイル

    パラメータ:

      class STYLEOBJECT styleobj
        The style object to read from
      string stylename$
        The style name

    戻り値

    作成日時: 28-Sep-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class STYLEOBJECT style;
    class BITMAPPATTERN bitmap;
    class LINEPATTERN linepattern;
    string filepath$ = "C:/Program Files/MicroImages/TNT_69/stdstyle.rvc";
    # Open the style object
    string obj$ = "BitmapPatterns/General";
    style = OpenStyleObject(filepath$,  obj$);     # if the style is a subobject SEE: OpenStyleSubObject()
    bitmap = StyleReadBitmapPattern(style, "Bitmap0");
    # Open the style object
    string obj$ = "LinePatterns/Basic";
    style = OpenStyleObject(filepath$,  obj$);
    linepattern = StyleReadLinePattern(style, "LinePatt0");
    # Can do the same with
    # StyleReadLineStyle()
    # StyleReadPointStyle()
    # StyleReadPointSymbol()
    # StyleReadPolyStyle()
    # StyleReadTextStyle()
    CloseStyleObject(style);
    


    AddCallback(callback, function, data)

    場所:

    パラメータ:

      class CALLBACKLIST callback
        An instance of a class that is, or inherits from CallbackList
      proc function
        Procedure to call
      class anything data (オプション)
        Data passed to callback

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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;
    # Could also use the generic AddCallback() function
    WidgetAddCallback(closeButton.ActivateCallback,OnClose);
    # Open dialog window and keep script active
    # until window is closed.
    DialogOpen(win1);
    DialogWaitForClose(win1); # Example of CreateFormDialog()
    


    Exit
    Exit the script (calls functions registered with OnExit).

    Exit()

    場所:

      システム

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    ###
    ### Using Function Group
    ###
    class STATUSHANDLE statushandle;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statushandle = StatusDialogCreate();
    statuscontext = StatusContextCreate(statushandle);
    StatusSetMessage(statuscontext, "Starting...");
    # initialize progress bar
    StatusSetBar(statuscontext, 0, count);
    numeric percent = 0;
    numeric i;
    for i=1 to count
    {
           print(i);
           StatusSetBar(statuscontext, i, count);
           
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
    }
    StatusContextDestroy(statuscontext);
    StatusDialogDestroy(statushandle);
    ###
    ### Using Class Methods (Preferred)
    ###
    class STATUSDIALOG statusdialog;
    class STATUSCONTEXT statuscontext;
    numeric count = 500;
    # Create progress dialog
    statusdialog.Create();
    statuscontext = statusdialog.CreateContext();
    statuscontext.Message = "Starting...";
    # initialize progress bar
    statuscontext.BarInit(count,0);
    numeric percent;
    numeric i;
    for i=1 to count
    {
           print(i);
           statuscontext.BarIncrement(1,0);
    #      if(i%25==0)
    #      {
                  percent = round((i/count) * 100);
                  statuscontext.Message = "Task Completed: " + NumToStr(percent) + "%" ; 
    #      }
           if (statusdialog.CheckCancel())
           {
                  print("Task Cancelled");
                  Exit();
           }
    }
    statusdialog.destroy();
    


    GetLastError
    Get the last error encountered in the script to test if a function succeeded

    GetLastError()

    場所:

      システム

    詳細と仮定

      Calling the function clears the error code, so if you call it twice, the 2nd call will return 0.

    戻り値

      numeric
      Returns an error code with value < 0, or 0 if there's no error.
      Starting with TNTmips7.0 script writer can perform their own error
      handling by setting _context.AbortOnError=0

    作成日時: 29-Jan-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    _context.AbortOnError =0;
    func hadError()
    {
           if (GetLastError() < 0)
                  return 1;
           else return 0;
    }
    vector V;
    GetInputVector(V);
    if(hadError()) print("ERROR - GetInputVector");
    VectorDeleteDangleLines(V, 300);              # need to init toolkit first
    if(hadError()) print("ERROR - DeleteDangles"); # this is the only print executed
    if(hadError()) print("ERROR - Returns 0 2nd time called");
    


    OnExit
    Register function to call just before script exits.

    OnExit(function, data)

    場所:

      システム

    パラメータ:

      proc function
        The function to call
      class anything data (オプション)
        Data to pass to the function

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # prints 1 2 3
    # In general, on exit can be used to clean up at end of script
    # i.e. close rasters, delete temp files, etc.
    proc printThree()
    {
           print(3);
    }
    print(1);
    OnExit(printThree);
    print(2);
    


    run
    Runs another command

    run(command$, wait)

    場所:

      システム

    パラメータ:

      string command$
        Any valid string
      numeric wait (オプション)
        1 or 0-1 means run() will not return until
        the command completes
        0 means command will run in the background

    戻り値

      numeric
      Returns a number < 0 if the run command failed

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    run("program.exe", 0); # run in background
    


    RunAssociatedApplication
    Runs application associated with passed file

    RunAssociatedApplication(filename$)

    場所:

      システム

    パラメータ:

      string filename$
        File to open

    戻り値

      なし

    作成日時: 18-Oct-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    sleep
    Pause execution for a number of seconds.

    sleep(seconds)

    場所:

      システム

    パラメータ:

      numeric seconds
        Number of seconds to sleep

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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);
    while (1) # now read data
    {
           print(gpsport.protocol, gpsport.name, "\n");
           gpsdata = GPSPortRead(gpsport);
           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);
           print("\n\n");
           sleep(1);
    }
    # close the port
    GPSPortClose(gpsport);
    


    WaitForExit
    Suspend script but process callbacks and events.

    WaitForExit()

    場所:

      システム

    パラメータ:

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/view.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


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

    場所:

    パラメータ:

      numeric maxrgbvalue
        The maximum value for red, green, or blue
      numeric c
        Cyan
      numeric m
        Magenta
      numeric y
        Yellow
      numeric k
        Black
      numeric variable red
        Red value returned
      numeric variable green
        Green value returned
      numeric variable blue
        Blue value returned

    戻り値

      なし

    作成日時: 08-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

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

    場所:

      カラー変換

    パラメータ:

      numeric hue
        Hue (range 0 - 360)
      numeric saturation
        Saturation (range 0 - 100)
      numeric value
        Value (range 0 - 100)
      numeric variable red
        Red value returned (range 0 - 255)
      numeric variable green
        Green value returned (range 0 - 255)
      numeric variable blue
        Blue value returned (range 0 - 255)

    戻り値

      なし

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    numeric h, b, s, red, green, blue;
    h = 180;
    b = 50;
    s = 50;
    ConvertHBStoRGB(h, b, s, red, green, blue);
    printf("hbs - rgb  %3d %3d %3d - %3d %3d %3d\n", h, b, s, red, green, blue);
    


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

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

    場所:

      カラー変換

    パラメータ:

      numeric maxrgbvalue
        The maximum posible value of red, green and blue
      numeric hue
        Hue value (range 0 to 360)
      numeric intensity
        Brightness value (range 0 to 100)
      numeric saturation
        Saturation value (range 0 to 100)
      numeric variable red
        Red value returned (range 0 to maxrgbvalue)
      numeric variable green
        Green value returned (range 0 to maxrgbvalue)
      numeric variable blue
        Blue value returned (range 0 to maxrgbvalue)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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();
    numeric maxrgb = 255;
    numeric h, i, s, r, g, b;
    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
    Convert hue, saturation, value to red, green, blue

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

    場所:

      カラー変換

    パラメータ:

      numeric hue
        Hue (range 0 - 360)
      numeric saturation
        Saturation (range 0 - 208)
      numeric value
        Value (range 0 - 512)
      numeric variable red
        Red value returned (range 0 - 255)
      numeric variable green
        Green value returned (range 0 - 255)
      numeric variable blue
        Blue value returned (range 0 - 255)

    戻り値

      なし

    作成日時: 10-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

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

    場所:

      カラー変換

    パラメータ:

      numeric red
        Red value (range 0 - 255)
      numeric green
        Green value (range 0 - 255)
      numeric blue
        Blue value (range 0 - 255)
      numeric variable hue
        Hue returned (range 0 - 360)
      numeric variable brightness
        Brightness returned (range 0 - 100)
      numeric variable saturation
        Saturation returned (range 0 - 100)

    戻り値

      なし

    作成日時: 13-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


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

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

    場所:

      カラー変換

    パラメータ:

      numeric maxrgbvalue
        The maximum posible value of red, green, and blue
      numeric red
        Red value (range 0 to maxrgbvalue)
      numeric green
        Green value (range 0 to maxrgbvalue)
      numeric blue
        Blue value (range 0 to maxrgbvalue)
      numeric variable hue
        Hue value returned (range 0 to 360)
      numeric variable intensity
        Brightness value returned (range 0 to 100)
      numeric variable saturation
        Saturation value returned (range 0 to 100)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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();
    numeric maxrgb = 255;
    numeric h, i, s, r, g, b;
    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
    Convert red, green, blue to hue, saturation, value

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

    場所:

      カラー変換

    パラメータ:

      numeric red
        Red value (range 0 - 255)
      numeric green
        Green value (range 0 - 255)
      numeric blue
        Blue value (range 0 - 255)
      numeric variable hue
        Hue returned (range 0 - 360)
      numeric variable saturation
        Saturation returned (range 0 - 208)
      numeric variable value
        Value returned (range 0 - 512)

    戻り値

      なし

    作成日時: 10-Jul-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Example of ConvertRGBtoHSV()
    numeric r, g, b, h, s, v;
    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);
    


    CreateStatusDialog(parent, flags$)

    場所:

    パラメータ:

      class Widget parent (オプション)
        The parent widget of the status dialog
      string flags$ (オプション)
        See below
        可能性のある値:
          "NoCancel"
            Disable the cancel button
          "DelayPopup"

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    GetInputObject
    Popup dialog to select an object and return info.

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

    場所:

      ポップアップダイアログ

    パラメータ:

      string ObjectType$
        See below
        可能性のある値:
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      string prompt$
        Dialog prompt
      string rvcFilename$
        RVC filename returned
      string objectName$
        Object name returned

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string type$ = "Style";
    string prompt$ = "Go find a style object.";
    string filename$, obj$;
    GetInputObject(type$, prompt$, filename$, obj$);
    print(filename$, obj$);
    


    GetOutputObject
    Prompt the user for an output object

    GetOutputObject(ObjectType$, NewOrExisting$, prompt$, rvcFilename$, objectName$, objectDescription$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string ObjectType$
        See below
        可能性のある値:
          "Raster"
            Get Raster Object
          "Vector"
            Get Vector Object
          "CAD"
            Get CAD Object
          "TIN"
            Get TIN Object
          "Layout"
            Display Layout
          "Group"
            Display Group
          "Database"
            Database
          "Region"
            Region
          "Style"
            Style object
      string NewOrExisting$
        See below
        可能性のある値:
          "ExistingOnly"
            Allow existing objects only
          "NewOnly"
            Allow new objects only
          "NewOrExisting"
            Allow new or existing objects
      string prompt$
        Dialog prompt
      string rvcFilename$
        RVC filename returned
      string objectName$
        RVC filename returned
      string objectDescription$
        RVC filename returned

    詳細と仮定

      This function does not actually create any new objects.
      If the object does not already exist then "objectName" will contain the name as entered by the user.
      If the object already exists then "objectName" will contain the entire object path.

    戻り値

      なし

    作成日時: 17-Jun-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string type$ = "Style";
    string prompt$ = "Go find a style object.";
    string filename$, obj$, desc$;
    GetOutputObject(type$, "NewOnly", prompt$, filename$, obj$, desc$);
    print(filename$);
    print(obj$);
    print(desc$);
    


    PopupError
    Displays a popup window and displays the text associated with error_code

    PopupError(error_code)

    場所:

      ポップアップダイアログ

    パラメータ:

      numeric error_code
        A number returned from a SML function
        indicating an error has occurred - see
        errmsgs.txt for a complete list

    詳細と仮定

      Error codes are always negative.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    PopupMessage
    Open popup window with message and [OK] choice

    PopupMessage(message$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string message$
        A string holding the message

    詳細と仮定

      The only response from the user is to press the OK
      button in the message window.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    PopupMessage("Hello!");
    


    PopupNum
    Open popup window asking for a number

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

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      numeric default (オプション)
        Optional - (a number), the value returned if the user
        hit
      numeric min (オプション)
        Optional - (a number), the minimum acceptable value
      numeric max (オプション)
        Optional - (a number), the maximum acceptable value
      numeric decimal_places (オプション)
        Optional - (an integer), the number of decimal places
        used when displaying the default value. This has no
        effect on the value returned

    詳細と仮定

      The optional arguments must all be used and entered in order. If
      an out-of-range value is entered, SML will beep and require a new
      entry before proceeding.

    戻り値

      numeric
      either the default of the number entered.
      If the user hits cancel the return value will be NULL. Note that
      to detect this, you must use the function IsNull()

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    PopupSelectTable
    Popup dialog for database table selection

    PopupSelectTable(database, table$)

    場所:

      ポップアップダイアログ

    パラメータ:

      class DATABASE database
        The database
      string variable table$
        Table name (passed/returned)

    戻り値

      numeric

    作成日時: 19-Oct-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    vector V;
    class DATABASE db;
    string tablename$;
    GetInputVector(V);
    if (V.$Info.NumPolys>0)
    {
           db = OpenVectorPolyDatabase(V);
           PopupSelectTable(db, tablename$);
           print("You selected:", tablename$);
    }
    


    PopupSelectTableField
    Popup dialog for user to select a table and field

    PopupSelectTableField(database, table$, field$)

    場所:

      ポップアップダイアログ

    パラメータ:

      class DATABASE database
        The database
      string variable table$
        Table name (passed/returned)
      string variable field$
        Field name (passed/returned)

    戻り値

      numeric
      1 on success, 0 on user cancel, -1 on error

    作成日時: 19-Oct-2000
    修正日時: なし
    TNTsml for Windows で使用可能: いいえ

    例:

    clear();
    class DATABASE database;
    vector V;
    string table$, field$;
    GetInputVector(V);
    database = OpenVectorPolyDatabase(V);
    PopupSelectTableField(database, table$, field$);
    print(table$ + "." + field$);
    


    PopupString
    Open popup window asking for a string

    PopupString(prompt$, default$, title$)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      string default$ (オプション)
        The string returned if the user hit .
      string title$ (オプション)
        The title for the dialog window

    戻り値

      string
      either the string you entered or the default string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    PopupYesNo
    Open popup window asking for a yes or no input

    PopupYesNo(prompt$, default)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      numeric default (オプション)
        Optional - (a number), if set to 1, then hitting
        returns 1, which is the same as pressing
        yes. If set to zero, then hitting the
        returns 0, which is the same as pressing NO.
        Anything else has no effect.

    詳細と仮定

      Pressing YES returns1. Pressing NO returns 0. Pressing
      returns default (if set).

    戻り値

      numeric
      either 1 or 0

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    PopupYesNoCancel
    Open popup window asking for a yes, no or cancel

    PopupYesNoCancel(prompt$, default)

    場所:

      ポップアップダイアログ

    パラメータ:

      string prompt$
        A string holding the message
      numeric default (オプション)
        Optional - (a number), if set to 1, then
        hitting returns 1, which is the same
        as pressing yes. If set to zero, then hitting
        the returns 0, which is the same as
        pressing NO. Anything else has no effect.

    詳細と仮定

      Pressing YES returns1. Pressing NO returns 0. Pressing
      CANCEL does nothing. Pressing returns default (if set).

    戻り値

      numeric
      either 1 or 0

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

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


    GetInputCAD(CADvar)

    場所:

    パラメータ:

      CAD CADvar
        The input CAD object

    詳細と仮定

      The CADVar is a valid variable name

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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();
    cad C;
    GetInputCAD(C);
    numeric numBlocks = CADNumBlocks(C);
    print("number of blocks: ", numBlocks);
    string elemtype$;
    numeric numElements;
    # loop through all blocks
    numeric blk, elem;
    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
                  elemtype$ = CADElementType(C, blk, elem);
                  printf("block: %3d element: %5d type: %s\n", blk, elem, elemtype$);
                  }
           }
    CloseCAD(C);
    


    GetOutputCAD
    Opens a CAD object for reading or writing

    GetOutputCAD(CADvar)

    場所:

      CAD

    パラメータ:

      CAD CADvar
        The output CAD object

    詳細と仮定

      The CAD is a valid variable name

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # circle.sml
    # demonstrate creating and reading a circle CAD element
    clear();
    # create a new file or open existing file
    cad C;
    GetOutputCAD(C);
    # write a circle
    numeric 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
    numeric lastelem = CADNumElements(C, 1);
    # now read cirle data for most recently added element
    numeric xCenter, yCenter, radius;
    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);
    


    GetInputTIN(TIN)

    場所:

    パラメータ:

      TIN TIN
        A valid TIN variable

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    tin TinIn;
    GetInputTIN(TinIn);
    # do something useful with the tin
    CloseTIN(TinIn);
    


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

    GetOutputTIN(TIN, flag1$, flag2$)

    場所:

      TIN

    パラメータ:

      TIN TIN
        A valid TIN variable
      string flag1$ (オプション)
        See below
        可能性のある値:
          "TINToolkit"
            Open existing or create new TIN object for write
      string flag2$ (オプション)
        See below
        可能性のある値:
          "ComputeStandardAttributes"
            Compute standard attributes at close

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class tin Tout;
    GetOutputTIN(Tout);
    # get the RVC file name
    string str$ = GetObjectFileName(Tout);
    numeric objNum = GetObjectNumber(Tout);
    clear();
    print("TIN Object Number: ", objNum, "RVC file Name: ", str$);
    


    CopyFile(inputFile$, outputFile$, statusHandle)

    場所:

    パラメータ:

    詳細と仮定

      if a StatusHandle is passed and it is NULL then no status will be shown

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 22-Jun-1998
    修正日時: 22-Jun-1998
    TNTsml for Windows で使用可能: はい

    例:

    # Example of CopyFile()
    class StatusHandle statusHandle;
    # create and destroy default status dialog
    numeric result = CopyFile("c:/tnt/data/cb_tm.rvc", "c:/tnt/data/cb_tm_copy.rvc");
    print(result);
    # don't display status - statusHandle is NULL
    result = CopyFile("c:/tnt/data/cb_tm.rvc", "c:/tnt/data/cb_tm_copy.rvc", statusHandle);
    print(result);
    


    CreateDir
    Create a directory

    CreateDir(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        New directory name

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 06-Mar-2001
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    string base$ = "C:/Who created this";
    string subfolder$ = base$ +  "/SML Did";
    CreateDir(base$);
    CreateDir(subfolder$);
    


    CreateTempFileName
    Create a temporary file name.

    CreateTempFileName()

    場所:

      ファイル

    パラメータ:

    戻り値

      string
      Filename string.

    作成日時: 08-Dec-2000
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    file = fopen(CreateTempFileName(),"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen("C:/tmp","rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    


    DeleteFile
    Delete a file.

    DeleteFile(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        The file name of the file to delete

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/view-rgb.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    fclose
    Close a file previously opened with fopen()

    fclose(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        The file number returned by the fopen() function.

    詳細と仮定

      The text file must already exist for any mode that expects to read
      from it.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # assume file already exists
    clear();
    class FILE f;
    f=fopen("c:/junk.txt", "r");
    # get next line of text from text file specified by fileNumber
    string str$ = fgetline$(f);
    print(str$);
    fclose(f);
    


    feof
    Detects end of file

    feof(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        A valid file handle

    詳細と仮定

      fileNumber is a valid file number returned from previous fopen()

    戻り値

      numeric
      1 if at the end of the file, 0 if not.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next line of text from text file specified by fileNumber
    while(!feof(f))
    {
           string str$ = fgetline$(f);
           print(str$);
    }
    fclose(f);
    


    fexists
    Checks for existence and i/o mode of file

    fexists(filename$, mode$)

    場所:

      ファイル

    パラメータ:

      string filename$
        A string-path and file name
      string mode$ (オプション)
        A string-the mode "r", "w", etc.
        可能性のある値:
          "r"
            See if we can read the file
          "r+"
            See if we can read and write the file
          "w"
            See if we can write the file

    戻り値

      numeric
      Boolean true or false indicating existence of file

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    if (fexists("c:\temp.txt", "r")) then
           print("c:\temp.txt exists");
    


    fgetline$
    Get next line of text from a text file

    fgetline$(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File handle returned by the fopen() function

    詳細と仮定

      The pointer starts at the beginning of the text file.
      After each call to fgetline$() or fgetnum(), the
      pointer automatically advances.

    戻り値

      string
      the next line of text after the pointer, including the
      end of line character (\n), or 0 if at the end of file

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next line of text from text file specified by fileNumber
    while(!feof(f))
    {
           string str$ = fgetline$(f);
           print(str$);
    }
    fclose(f);
    


    fgetnum
    Get next number from text file

    fgetnum(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File handle returned by the fopen() function

    詳細と仮定

      The pointer begins at the beginning of the text file.
      After each call to fgetline$() or fgetnum(), the
      pointer automatically advances to the next piece of
      text that can be interpreted as a number. The number(s)
      returned must be within the range of the system.

    戻り値

      numeric
      The next number after the pointer. Returns 0 if the
      next segment of ASCII is not a number.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next number from text file specified by fileNumber
    while(!feof(f))
    {
           numeric num = fgetnum(f);
           print(num);
    }
    fclose(f);
    


    fopen
    Open text file

    fopen(filename$, mode$, encoding$)

    場所:

      ファイル

    パラメータ:

      string filename$
        A string holding the filename, including a full path
      string mode$ (オプション)
        Optional - a string holding the read / write permissions for the file.
        By default, newline characters are translated from whatever is in
        the file to the format the current platform expects. This behavior
        can be changed by adding a "b" to the end of the mode string,
        causing the file to be opened in "binary" mode.
        可能性のある値:
          "r"
            Open for reading
          "r+"
            Open for reading and writing
          "w"
            Open for writing, truncate to zero length first
          "a"
            Open in append mode, write starting at the end of the file
          "rb"
            Open for reading - binary mode
          "r+b"
            Open for reading and writing - binary mode
          "wb"
            Open for writing, truncate to zero length first - binary mode
          "ab"
            Open in append mode, write starting at the end of the file - binary mode
      string encoding$ (オプション)
        The string encoding
        可能性のある値:
          "ASCII"
            ASCII
          "WinANSI"
            ANSI (Windows Code Page)
          "Big5"
            Chinese (Big5)
          "GB-2312"
            Chinese (GB-2312)
          "JIS"
            Japanese (JIS)
          "Shift-JIS"
            Shift-JIS Japanese encoding
          "EUC"
            Japanese (EUC)
          "MacJapanese"
            Japanese (Macintosh)
          "ISO-2022"
            ISO-2022 encoding (Default)
          "X-Resfile"
            X Resource File (TNTXRES.TXT)
          "Unicode"
            Unicode (2-byte)
          "UTF8"
            Unicode (UTF8) encoding
          "KSC-5601"
            Korean (KSC-5601)
          "KOI-8"
            Cyrillic (KOI-8)
          "CP855"
            Russian (CP855)
          "CP1251"
            Cyrillic (Windows Code Page 1251)
          "CP869"
            Greek (CP869)
          "CP1250"
            Eastern Europe (Windows Code Page 1250)
          "CP1253"
            Greek (Windows Code Page 1253)
          "CP1254"
            Turkish (Windows Code Page 1254)
          "CP1255"
            Hebrew (Windows Code Page 1255)
          "CP1256"
            Arabic (Windows Code Page 1256)
          "Thai"
            Thai
          "DOSCP437"
            United States (CP437)
          "DOSCP850"
            Multilingual (CP850)
          "DOSCP852"
            Slavic (CP852)
          "DOSCP857"
            DOS Code Page 857
          "DOSCP861"
            DOS Code Page 861
          "DOSCP863"
            Canadian French (CP863)
          "DOSCP865"
            Nordic (CP865)
          "ISO-8859-1"
            Latin 1 (ISO)
          "ISO-8859-2"
            Latin 2 (ISO)
          "ISO-8859-3"
            Latin 3 (ISO)
          "ISO-8859-4"
            Latin 4 (ISO)
          "ISO-8859-5"
            Cyrillic (ISO)
          "ISO-8859-6"
            Arabic (ISO)
          "ISO-8859-7"
            Greek (ISO)
          "ISO-8859-8"
            Hebrew (ISO)
          "ISO-8859-9"
            Turkish (ISO)
          "MacArabic"
            Arabic (Macintosh)
          "MacCroatian"
            Croatian (Macintosh)
          "MacCyrillic"
            Cyrillic (Macintosh)
          "MacCentEurope"
            Central Europe (Macintosh)
          "MacGreek"
            Greek (Macintosh)
          "MacHebrew"
            Hebrew (Macintosh)
          "MacIcelandic"
            Icelandic (Macintosh)
          "MacRomanian"
            Romanian (Macintosh)
          "MacRoman"
            Roman (Macintosh)
          "MacThai"
            Thai (Macintosh)
          "MacTurkish"
            Turkish (Macintosh)
          "MacUkrainian"
            Ukrainian (Macintosh)
          "ISCII_Devanagari"
            ISCII (Devanagari)
          "ISCII_Bengali"
            ISCII (Bengali)
          "ISCII_Gurmukhi"
            ISCII (Gurmukhi)
          "ISCII_Gujarati"
            ISCII (Gujarati)
          "ISCII_Oriya"
            ISCII (Oriya)
          "ISCII_Tamil"
            ISCII (Tamil)
          "ISCII_Telugu"
            ISCII (Telugu)
          "ISCII_Kannada"
            ISCII (Kannada)
          "ISCII_Malayalam"
            ISCII (Malayalam)

    詳細と仮定

      The text file must already exist for any mode that expects to read
      from it.

    戻り値

      class FILE
      a file handle

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # assume file already exists
    clear();
    class FILE f;
    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
    Print unformated text or values to text file

    fprint(file, value, ...)

    場所:

      ファイル

    パラメータ:

      class FILE file
        The number returned from the previously
        used fopen() function
      any value value (オプション)
        One or more numbers or strings to print
      any value ... (オプション)
        (you can have any number of values)

    詳細と仮定

      The text file must be open and writable

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear(); # assume file already exists
    # Open a file, then write to the file, then close it
    class FILE f;
    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
    Print formatted text or values to text file

    fprintf(file, format$, value, ...)

    場所:

      ファイル

    パラメータ:

      class FILE file
        The number returned from the previously used fopen() function
      string format$
        Printf-style format string.
        The format string is scanned for format specification fields, which all start with
        a percent sign (%). Each format specification is replaced by the value of the next
        parameter passed after the format string. There should be a value passed for each
        format specification field.
        Format Specification fields have the following form (parts in square brackets are
        optional)
        %[flags][width][.precision]type
        flags
        Optional characters to control justification and sign display
        - : Left align the result within the field
        + : Prefix numeric value with a sign (+ or -), even if positive
        0 : If with is prefixed with a zero, the number will have leading zeros
        width
        Optional number that specifies the minimum number of characters output
        precision
        Optional number that specifies the maximum number of digits after the
        decimal place for floating point numbers
        type
        Required character specifying the type of parameter to output
        s : String
        d : Signed decimal integer
        u : Unsigned decimal integer
        o : Unsigned octal integer
        x : Unsigned hexadecimal integer, using "abcdef"
        X : Unsigned hexadecimal integer, using "ABCDEF"
        c : A single character, specified the ASCII value.
        e : Floating point value in scientific notation (e.g.: 1e6 for 1,000,000)
        f : Floating point value, not in scientific notation
        g : Floating point value in e or f format, whichever is more compact
      any value value (オプション)
        Etc. one or more numbers or strings
      any value ... (オプション)
        (you can have any number of values)

    詳細と仮定

      The text file must be open and writable. See the printf()
      function for information on formatting strings.

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string str1$="This is line ";
    string str2$=" you see. ";
    string str3$="This is line 2. ";
    numeric number=1;
    # Create a file, then write to the file, then close it
    class FILE f;
    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
    Read raw bytes a from a file.

    fread(file, buffer, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        An open file handle
      array buffer
        The array to hold the data read. Values will all be in the range of 0 to 255
      numeric length
        Number of bytes to read

    戻り値

      numeric
      Number of bytes actually read

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    file = fopen(CreateTempFileName(),"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen("C:/tmp","rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    


    freadbyte
    Read a byte from a file or port.

    freadbyte(file)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port

    戻り値

      numeric
      The byte read. Returns NULL if at end of file.
      You must use IsNull() to detect null value, you cannot
      compare to it.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    file = fopen(CreateTempFileName(),"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen("C:/tmp","rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    


    freadstring
    Read a string from a file.

    freadstring(file, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port
      numeric length
        Maximum length to read

    戻り値

      string
      The string read.
      Use fgetline$() to read an entire line up to the next newline character

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    fwrite
    Write unformated data to a file.

    fwrite(file, buffer, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        An open file handle
      array buffer
        The array holding the bytes to write. Values must be in the range of 0 to 255
      numeric length
        Number of bytes to write

    戻り値

      numeric
      The number of bytes actually written

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    class FILE file;
    numeric numbytes = 8;
    array numeric bufferW[numbytes];              # 8-byte buffer
    array numeric bufferR[numbytes];
    file = fopen(CreateTempFileName(),"wb" );
    # write some stuff into the buffer
    numeric i;
    for i=1 to 8
    {
           bufferW[i] = (i * 100) % 256;
    }
    fwrite(file, bufferW, numbytes); # could also use fwritebyte()
    fclose(file);
    file = fopen("C:/tmp","rb" );
    fread(file, bufferR, numbytes);       # could also use freadbyte()
    # test that everything was written/read properly
    for i=1 to 8
    {
           print(bufferW[i], "=", bufferR[i]);
    }
    


    fwritebyte
    Write a byte to a file or port.

    fwritebyte(file, byte, ...)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port
      numeric byte
        The byte to write
      numeric ... (オプション)
        Additional bytes to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    fwritestring
    Write a string to a file.

    fwritestring(file, string$, length)

    場所:

      ファイル

    パラメータ:

      class FILE file
        File or port
      string string$
        The string to write
      numeric length (オプション)
        Maximum length to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # 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");
    


    GetDirectory
    Popup a dialog for selecting a directory

    GetDirectory(default$, prompt$)

    場所:

      ファイル

    パラメータ:

      string default$
        Default directory to use
      string prompt$
        Prompt to use

    戻り値

      string
      The file path

    作成日時: 11-Sep-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    string path$ = GetDirectory("C:/tnt", "Select a directory");
    print(path$);
    


    GetInputFileName
    Popup dialog to select a file

    GetInputFileName(default$, prompt$, ext$)

    場所:

      ファイル

    パラメータ:

      string default$
        Default file name
      string prompt$
        Prompt string
      string ext$
        File extension

    戻り値

      string
      Filename of the selected file

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    clear();
    class FILE f;
    string filename$ = GetInputFileName("","Select the desired file",".txt");
    f=fopen(filename$, "r");
    # get next line of text from text file specified by fileNumber
    while(!feof(f))
    {
           string str$ = fgetline$(f);
           print(str$);
    }
    fclose(f);
    


    GetInputTextFile
    Open or create a text file for input/output via dialog

    GetInputTextFile(defaultFilename$, prompt$, extension$, encoding$)

    場所:

      ファイル

    パラメータ:

      string defaultFilename$
        A default filename for the file selection dialog
      string prompt$
        Prompt for dialog
      string extension$
        The file extension of the file to open
      string encoding$ (オプション)
        The string encoding
        可能性のある値:
          "ISO-2022"
            ISO-2022 encoding (Default)
          "UTF8"
            Unicode (UTF8) encoding
          "Shift-JIS"
            Shift-JIS Japanese encoding

    戻り値

      class FILE
      Open file handle

    作成日時: 06-Aug-1998
    修正日時: 01-Feb-2001
    TNTsml for Windows で使用可能: はい

    例:

    # 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
    string str$ = fgetline$(fIn);
    print(str$);
    


    GetOutputFileName
    Popup dialog to select an output file.

    GetOutputFileName(default$, prompt$, ext$)

    場所:

      ファイル

    パラメータ:

      string default$
        Default file name
      string prompt$
        Prompt string
      string ext$
        File extension

    戻り値

      string
      Filename of the selected file.

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/pca.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    GetOutputTextFile
    Open a text file for output via dialog

    GetOutputTextFile(defaultFilename$, prompt$, extension$, encoding$)

    場所:

      ファイル

    パラメータ:

      string defaultFilename$
        Default path/filename.ext
      string prompt$
        Prompt for dialog
      string extension$
        File extension
      string encoding$ (オプション)
        File encoding
        可能性のある値:
          "ISO-2022"
            ISO-2022 encoding (Default)
          "UTF8"
            Unicode (UTF8) encoding
          "Shift-JIS"
            Shift-JIS Japanese encoding

    戻り値

    作成日時: 06-Aug-1998
    修正日時: 01-Feb-2001
    TNTsml for Windows で使用可能: はい

    例:

    # 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
    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()

    PortAddCallback(callback, function, data)

    場所:

      ファイル

    パラメータ:

      class CALLBACKLIST callback
        Class CallbackList
      proc function
        Procedure to call
      class anything data (オプション)
        Data passed to callback

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PortClose
    Close a port.

    PortClose(port)

    場所:

      ファイル

    パラメータ:

      class PORT port
        The port to close

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    PortOpen
    Open a port.

    PortOpen(name$, type$)

    場所:

      ファイル

    パラメータ:

      string name$
        Port name
      string type$ (オプション)
        Port type

    戻り値

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/planter2.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    RenameFile
    Rename a file.

    RenameFile(oldname$, newname$)

    場所:

      ファイル

    パラメータ:

      string oldname$
        The old filename
      string newname$
        The new filename

    戻り値

      numeric
      Returns 0 for success and an error code < 0 for failure.
      Starting with TNTmips7.0 script writer can perform their
      own error handling by setting _context.AbortOnError=0
      See Also: GetLastError

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/ToolScript/URLS.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ScriptResourceReadFull
    Read a text file from a text subobject under the script or a file in the same directory

    ScriptResourceReadFull(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        File name

    戻り値

      string

    作成日時: 20-Nov-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    TextFileReadFull
    Read an entire text file into a string (keep the size "reasonable")

    TextFileReadFull(filename$)

    場所:

      ファイル

    パラメータ:

      string filename$
        The text file

    戻り値

      string

    作成日時: 01-Feb-1999
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    IniClose(handle)

    場所:

    パラメータ:

    戻り値

      なし

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read default display position from an ini and open a raster in view window
    class DISP d;
    numeric w = 500;
    numeric h = 600;
    raster R;
    class INIHANDLE ini;
    # get the position
    string inifile$ = "C:/Program Files/MicroImages/TNT_69/tntproc.ini";
    ini = IniOpenFile(inifile$);
    string pos$ = IniReadString("tntdisp", "WinPosGroup1View2D1");
    IniClose(ini);
    numeric x = StrToNum(GetToken(pos$, " ", 1, 1));
    numeric y = StrToNum(GetToken(pos$, " ", 2, 1));
    # open the raster
    GetInputRaster(R);
    d = DispOpen(w, h, x, y);
    DispQuickAddRasterVar(d, R);
    


    IniOpenFile
    Open an ini file

    IniOpenFile(filename$)

    場所:

      INI ファイル

    パラメータ:

      string filename$
        The file to open

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read default display position from an ini and open a raster in view window
    class DISP d;
    numeric w = 500;
    numeric h = 600;
    raster R;
    class INIHANDLE ini;
    # get the position
    string inifile$ = "C:/Program Files/MicroImages/TNT_69/tntproc.ini";
    ini = IniOpenFile(inifile$);
    string pos$ = IniReadString("tntdisp", "WinPosGroup1View2D1");
    IniClose(ini);
    numeric x = StrToNum(GetToken(pos$, " ", 1, 1));
    numeric y = StrToNum(GetToken(pos$, " ", 2, 1));
    # open the raster
    GetInputRaster(R);
    d = DispOpen(w, h, x, y);
    DispQuickAddRasterVar(d, R);
    


    IniOpenObject
    Open an RVC text object

    IniOpenObject(filename$, objectname$)

    場所:

      INI ファイル

    パラメータ:

      string filename$
        The RVC filename
      string objectname$
        The object name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # See: IniOpenFile()
    # IniOpenObject() works similarly to IniOpenFile
    #
    # Use this function if the ini file is stored as an object.
    


    IniOpenScriptResource
    Open an INI file as a subobject of the script or file in same directory

    IniOpenScriptResource(objectname$)

    場所:

      INI ファイル

    パラメータ:

      string objectname$
        Object name

    戻り値

    作成日時: 07-Apr-1998
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # See: IniOpenFile()
    # IniOpenScriptResource() works similarly to IniOpenFile
    #
    # It is assumed to be in the same directory.
    


    IniReadNumber
    Read a number from an ini file

    IniReadNumber(group$, field$, default, min, max)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      numeric default (オプション)
        The default value
      numeric min (オプション)
        Minumum allowed value
      numeric max (オプション)
        Maximum allowed value

    戻り値

      numeric

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    IniReadString
    Read a string from an ini file

    IniReadString(group$, field$, default$)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      string default$ (オプション)
        Default string to return if value not found

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # read default display position from an ini and open a raster in view window
    class DISP d;
    numeric w = 500;
    numeric h = 600;
    raster R;
    class INIHANDLE ini;
    # get the position
    string inifile$ = "C:/Program Files/MicroImages/TNT_69/tntproc.ini";
    ini = IniOpenFile(inifile$);
    string pos$ = IniReadString("tntdisp", "WinPosGroup1View2D1");
    IniClose(ini);
    numeric x = StrToNum(GetToken(pos$, " ", 1, 1));
    numeric y = StrToNum(GetToken(pos$, " ", 2, 1));
    # open the raster
    GetInputRaster(R);
    d = DispOpen(w, h, x, y);
    DispQuickAddRasterVar(d, R);
    


    IniWriteNumber
    Write a number to an ini file

    IniWriteNumber(group$, field$, value)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      numeric value
        The value to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    IniWriteString
    Write a string to an ini file

    IniWriteString(group$, field$, value$)

    場所:

      INI ファイル

    パラメータ:

      string group$
        The group name
      string field$
        The field name
      string value$
        The value to write

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    Unable to locate sample script "smlsamples/StandAlone/doqq7.sml" for this function.
    Please download latest collection of reference scripts from www.microimages.com and try again.
    


    ResourceAugment(xmlfilename$)

    場所:

    パラメータ:

      string xmlfilename$
        Path to file, must be in proper XML or binary format

    戻り値

      numeric

    作成日時: 23-Sep-2004
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    ResourceLookupLabel
    Lookup a labelString resource from tntxres.txt

    ResourceLookupLabel(key$)

    場所:

      リソースファイル

    パラメータ:

      string key$
        The identifier of the message to read

    戻り値

      string

    作成日時: 26-Feb-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # for displaying localized messages and interface text
    clear();
    string search$ = "help";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    string search$ = "Prompt_Patterns_Insert";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    


    ResourceLookupMessage
    Lookup a message from messages.txt

    ResourceLookupMessage(name$)

    場所:

      リソースファイル

    パラメータ:

      string name$
        The name of the message to read

    詳細と仮定

      The messages.txt file is broken up into groups of related messages.

    戻り値

      string

    作成日時: 26-Feb-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # for displaying localized messages and interface text
    clear();
    string search$ = "help";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    string search$ = "Prompt_Patterns_Insert";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    


    ResourceLookupTitle
    Lookup a title resource from tntxres.txt

    ResourceLookupTitle(key$)

    場所:

      リソースファイル

    パラメータ:

      string key$
        The identifier of the message to read

    戻り値

      string

    作成日時: 26-Feb-2003
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # for displaying localized messages and interface text
    clear();
    string search$ = "help";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    string search$ = "Prompt_Patterns_Insert";
    print("Message:", ResourceLookupMessage(search$));
    print("Label:", ResourceLookupLabel(search$));
    print("Title:", ResourceLookupTitle(search$));
    


    BarGraph$(max, bordercolor$, value1, color1$, value2, color2$, ...)

    場所:

    パラメータ:

      numeric max
      any value bordercolor$ (オプション)
      any value value1 (オプション)
      any value color1$ (オプション)
      any value value2 (オプション)
      any value color2$ (オプション)
      any value ... (オプション)

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Circle$

    Circle$(x, y, radius, color$, filled)

    場所:

      シンボル

    パラメータ:

      numeric x
      numeric y
      numeric radius
      string color$ (オプション)
      numeric filled (オプション)

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Ellipse$

    Ellipse$(x, y, r1, r2, color$, filled, angle)

    場所:

      シンボル

    パラメータ:

      numeric x
      numeric y
      numeric r1
      numeric r2
      string color$ (オプション)
      numeric filled (オプション)
      numeric angle (オプション)

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Line$

    Line$(x1, y1, x2, y2, color$, thickness)

    場所:

      シンボル

    パラメータ:

      numeric x1
      numeric y1
      numeric x2
      numeric y2
      string color$ (オプション)
      numeric thickness (オプション)

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    PieChart$

    PieChart$(bordercolor$, value1, color1$, value2, color2$, ...)

    場所:

      シンボル

    パラメータ:

      any value bordercolor$ (オプション)
      any value value1
      any value color1$ (オプション)
      any value value2 (オプション)
      any value color2$ (オプション)
      any value ... (オプション)

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Rectangle$

    Rectangle$(x, y, height, width, angle, color$, filled)

    場所:

      シンボル

    パラメータ:

      numeric x
      numeric y
      numeric height
      numeric width
      numeric angle (オプション)
      string color$ (オプション)
      numeric filled (オプション)

    戻り値

      string

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    LineStyleAddToOptimizer(xstart, ystart, xlast, ylast, rank, dooptimize, dodelete)

    場所:

    パラメータ:

      numeric xstart
        The label's minimum x extent (on left edge)
      numeric ystart
        The label's minimum y extent (on lower edge)
      numeric xlast
        The label's maximum x extent (on right edge)
      numeric ylast
        The label's maximum y extent (on upper edge)
      numeric rank (オプション)
        Label's rank (any number), the label's importance increases with this value
      numeric dooptimize (オプション)
        A value of 0 limits changes in label position to a single pass through the point labels.
      numeric dodelete (オプション)
        Turn label deletion on (1) or off (0)

    詳細と仮定

      This function tabulates the extents of each point label's bounding rectangle. Values for xstart and ystart can be read or computed from the point coordinates in the Internal table. Values for xlast and ylast can be computed from the starting coordinates and the height and length of the text string (the length can obtained using the LineStyleTextNextPosition() function). After all points have been processed, the optimizer deletes conflicting labels or moves them to alternate positions around the point, then calls a function called FuncDrawLabel()to draw the labels. The script must include a definition for this function that contains all necessary drawing instructions, including font, color, and height of the labels, and the LineStyleDrawText() or LineStyleDrawTextBox() function. The FuncDrawLabel() function cannot directly access variable values defined in the main body of the script (such as the rank parameter); all variables required for drawing labels must be defined independently in the function definition.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Optimize placement of text labels with
    # names of towns for vector points.
    # Use three rank classes based on population
    # to control optimization and to vary height
    # and color of label text.
    # Label sizes for three sizes of towns
    small = 2500; med = 3500; big = 4500;
    # Rank towns by population
    pop = TownData.POP90;
    if (pop < 1000) then {
           rank = 1; height = small;
           }
    else {
           if (pop >= 30000 ) then { 
           rank = 3; height = big;
           }
           else {
                  rank = 2; height = med;
                  }
           }
    # Draw circle with size based on rank
    radius = rank * 500;
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(radius,1);
    # Read label text and determine dimensions
    LineStyleSetFont("ARIALBD.TTF");
    LineStyleTextNextPosition(TownData.NAME,height,0,0,next_x,next_y,length);
    # Define parameters for optimization
    xstart = Internal.x; ystart  = Internal.y;
    xlast = xstart + length; ylast = ystart + height;
    dooptimize = 1; dodelete = 0;
    LineStyleAddToOptimizer(xstart,ystart,xlast,ylast,rank,dooptimize,dodelete);
    # Define required function to draw labels after optimization
    func FuncDrawLabel() {
           small = 2500; med = 3500; big = 4500;
           pop = TownData.POP90;
           if (pop < 1000) then {
                  height = small; LineStyleSetTextColor(0,0,0);
                  }
           else {
           if (pop >= 30000 ) then { 
                  height = big;
                  LineStyleSetTextColor(255,0,0);
                  }
                  else {
                         height = med;
                         LineStyleSetTextColor(0,0,255);
                         }
                  }
           LineStyleSetFont("ARIALBD.TTF");
           LineStyleDrawText(TownData.NAME,height,0,0);
           }
    


    LineStyleDrawArc
    Draw an arc centered at location referenced from current position

    LineStyleDrawArc(angle, dist, radius_x, radius_y, startangle, sweepangle, rotangle, isAngleAbs, closemode, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        Angle to the center point of the arc in degrees
      numeric dist
        Distance to the center point of the arc
      numeric radius_x
        X radius of ellipse (BEFORE ROTATION)
      numeric radius_y
        Y radius of ellipse (BEFORE ROTATION)
      numeric startangle
        Starting angle in degrees
      numeric sweepangle
        Sweep angle in degrees
      numeric rotangle
        Rotation angle in degrees
      numeric isAngleAbs (オプション)
        Is the starting angle absolute (0 default)
      numeric closemode (オプション)
        0 - no close, 1 - close arc, 2 - close arc via center point
      numeric dofill (オプション)
        Set to 1 to fill the arc, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the arc after drawing.
      If closemode == 0 AND dofill == 1 the arc will be filled (and thus must be closed)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw filled elliptical 90 degree arc starting at 60 degrees
    # and centered 45 degrees and 10 units from current position
    numeric angle = 45, dist = 10, radius_x = 10, radius_y = 15, startangle = 60;
    numeric sweepangle = 90, rotangle = 0, isAngleAbs = 0, closemode = 1, dofill = 1;
    LineStyleSetColor(0,0,0);
    LineStyleDrawArc(angle, dist, radius_x, radius_y, startangle, sweepangle, rotangle, isAngleAbs, closemode, dofill);
    


    LineStyleDrawArrow
    Draw an arrow from current position to specified point

    LineStyleDrawArrow(angle, dist, length, sweepangle, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        The angle to draw the arrow
      numeric dist
        The distance from start to end point
      numeric length
        The length of the arrow 'wings'
      numeric sweepangle
        Sweep angle in degrees
      numeric dofill (オプション)
        Set to 1 to fill the arrow, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the tip of the arrow after drawing. Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw black arrow 10 units long to 45 degrees, head lines 4 units long,
    # with 40 degree sweepangle and head filled
    numeric angle = 45, dist = 10, length = 4, sweepangle = 40, dofill = 1;
    LineStyleSetColor(0,0,0);
    LineStyleDrawArrow(angle, dist, length, sweepangle, dofill);
    


    LineStyleDrawCircle
    Draw a circle centered on the current position

    LineStyleDrawCircle(radius, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric radius
        The radius in object coordinates
      numeric dofill (オプション)
        Set to 1 to fill the circle, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the circle after drawing.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw a filled red circle with a radius of 10 units
    numeric radius = 10, dofill = 1;
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(radius, dofill);
    


    LineStyleDrawCone
    Draw a cone with the specified dimensions and fill color

    LineStyleDrawCone(long_axis, short_axis, height, color_red, color_green, color_blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric long_axis
        The length of the long axis
      numeric short_axis
        The length of the short axis
      numeric height
        The height of the cone
      numeric color_red
        The red color component (0-1)
      numeric color_green
        The green color component (0-1)
      numeric color_blue
        The blue color component (0-1)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the basal ellipse is placed at the current position, and the pen remains there after drawing. Cone edges are drawn using the current line drawing color. Color values for the fill color range from 0 to 255.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cone symbol with base 40 by 20 units, and height 100 units
    # with black edges and green fill color
    numeric long_axis = 40, short_axis = 20, height = 100;
    numeric color_red = 0, color_green = 255, color_blue = 0;
    LineStyleSetColor(0,0,0);
    LineStyleDrawCone(long_axis, short_axis, height, color_red, color_green, color_blue);
    


    LineStyleDrawCube
    Draw a rectangular solid shape with the specified dimensions and fill color

    LineStyleDrawCube(width, depth, height, color_red, color_green, color_blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric width
        The width of the cube
      numeric depth
        The depth of the cube
      numeric height
        The height of the cube
      numeric color_red
        The red color component (0-1)
      numeric color_green
        The green color component (0-1)
      numeric color_blue
        The blue color component (0-1)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the lower front edge of the cube is placed at the current position, and the pen remains there after drawing. Cube edges are drawn using the current line drawing color. Color values for the fill color range from 0 to 255.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cube symbol with width and height
    # of 16 units and depth of 8 units 
    # with black edges and red fill color
    numeric width = 16, depth = 0.5 * width, height = width;
    numeric color_red = 255,  color_green = 0, color_blue = 0;
    LineStyleSetColor(0,0,0);
    LineStyleDrawCube(width, depth, height, color_red, color_green, color_blue);
    


    LineStyleDrawCylinder
    Draw a vertical cylinder with the specified dimensions and fill color

    LineStyleDrawCylinder(long_axis, short_axis, height, color_red, color_green, color_blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric long_axis
        The length of the long axis
      numeric short_axis
        The length of the short axis
      numeric height
        The height of the cone
      numeric color_red
        The red color component (0-1)
      numeric color_green
        The green color component (0-1)
      numeric color_blue
        The blue color component (0-1)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the basal ellipse is placed at the current position, and the pen remains there after drawing. Cylinder edges are drawn using the current line drawing color. Color values for the fill color range from 0 to 255.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cylinder symbol with base 30 by 15 
    # units, height 100 units, and
    # with black edges and yellow fill color
    numeric long_axis = 30, short_axis = 15, height = 60;
    numeric color_red = 255, color_green = 255, color_blue = 0;
    LineStyleSetColor(0,0,0);
    LineStyleDrawCylinder(long_axis, short_axis, height, color_red, color_green, color_blue);
    


    LineStyleDrawEllipse
    Draw an ellipse centered at location referenced from current position

    LineStyleDrawEllipse(angle, dist, radius_x, radius_y, rotangle, isAngleAbs, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        Angle to the center point of the ellipse in degrees
      numeric dist
        Distance to the center point of the ellipse
      numeric radius_x
        X radius of ellipse (BEFORE ROTATION)
      numeric radius_y
        Y radius of ellipse (BEFORE ROTATION)
      numeric rotangle (オプション)
        Rotation angle in degrees
      numeric isAngleAbs (オプション)
        Is the starting angle absolute (0 default)
      numeric dofill (オプション)
        Set to 1 to fill the ellipse, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the ellipse after drawing. Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw filled green ellipse centered at the current
    # position with long axis = 20 units and short
    # axis = 10 units, and rotate 30 degrees counterclockwise
    numeric angle = 0, dist = 0, radius_x = 20, radius_y = 10;
    numeric rotangle = 30, isAngleAbs = 0, dofill = 1;
    LineStyleSetColor(0,0,0);
    LineStyleDrawEllipse(angle, dist, radius_x, radius_y, rotangle, isAngleAbs, dofill);
    


    LineStyleDrawLine
    Draw complete line element using currently set color and width

    LineStyleDrawLine()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      The current position on the line is not changed.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements as solid black lines
    # 3 units wide
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    


    LineStyleDrawPolygon
    Draw a polygon from previously recorded sequence of points

    LineStyleDrawPolygon(dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dofill (オプション)
        Set to 1 to fill the polygon, 0 otherwise (0 default)

    詳細と仮定

      Point locations of polygon vertices must be recorded using the LineStyleRecordPolygon( ) function before using this function. Use of this function stops the recording of vertex locations initiated by the LineStyleRecordPolygon() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw blue filled equilateral triangle 
    # with sides 30 units long
    LineStyleSetColor(0,0,255);
    LineStyleDropAnchor(0);
    LineStyleRecordPolygon(1);
    LineStyleMoveTo(0,30);
    LineStyleMoveTo(120,30);
    LineStyleMoveToAnchor(0);
    LineStyleDrawPolygon(1);
    


    LineStyleDrawPolyline
    Draw a polyline connecting previously recorded sequence of points

    LineStyleDrawPolyline()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      Point locations of polyline vertices must be recorded using the LineStyleRecordPolygon( ) function before using this function. Use of this function stops the recording of vertex locations initiated by the LineStyleRecordPolygon() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw brown polyline representing 
    # overlapping triangles of different sizes
    LineStyleSetColor(170,85,0);
    LineStyleRecordPolygon(1);
    LineStyleMoveTo(0,0);
    LineStyleMoveTo(55,30);
    LineStyleMoveTo(-55,20);
    LineStyleMoveTo(55,10);
    LineStyleMoveTo(-55,20);
    LineStyleDrawPolyline();
    


    LineStyleDrawRectangle
    Draw a rectangle

    LineStyleDrawRectangle(width, height, angle, dofill, isAbs)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric width
        The rectangle's width
      numeric height
        The rectangle's height
      numeric angle (オプション)
        The rectangle drawing angle in degrees (0 default)
      numeric dofill (オプション)
        Set to 1 to fill the rectangle, 0 otherwise (0 default)
      numeric isAbs (オプション)
        Is the angle absolute (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The center of the rectangle is placed at the current position, and the pen remains there after the rectangle is drawn. The base of the rectangle is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw solid line with regularly spaced filled
    # squares oriented with bases parallel to local
    # line direction.
    # Set parameters for squares
    width = 10; height = width;
    angle = 0 ; # no rotation of square
    dofill = 1;
    isAbs = 0; # orient to local coordinate system
    # Set spacing between squares
    spacing = 30;
    # Set line color and width and draw line
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    # Draw square at start of line
    LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
    # Draw rest of squares
    while (LineStyleRoll(spacing) != 1) {
           dist = LineStyleGetDistanceTo(3);
           if ( dist > spacing ) {
                  LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
                  }
           }
    


    LineStyleDrawText
    Draw a text string with specified height and orientation

    LineStyleDrawText(text$, height, angle, isAbs, next_x, next_y, length)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string text$
        The text string to draw
      numeric height
        The font height
      numeric angle
        The angle to draw the text at
      numeric isAbs
        Is the angle absolute (0 default)
      numeric variable next_x (オプション)
        The x coordinate for the next string (returned)
      numeric variable next_y (オプション)
        The y coordinate for the next string (returned)
      numeric variable length (オプション)
        The text strings length (returned)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The lower left corner of the text label is placed at the current position, and the pen remains there after the text is drawn. The base of the label is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value). The text is drawn using the current font set by the LineStyleSetFont() function and the current color set by the LineStyleSetTextColor() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw circle point symbols for towns,
    # read town names from database, and draw text
    # labels rotated 30 degrees counterclockwise.
    # Draw red circle point symbol
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(500,1);
    # Read town name from database field to string variable
    label$ = sprintf("%s",TownData.NAME);
    # Set text color and font
    LineStyleSetTextColor(0,0,0);
    LineStyleSetFont("ARIALBD.TTF");
    # Set label parameters
    height = 2000; angle = 30; isAbs = 0;
    # Move pen to right of symbol and draw label
    LineStyleMoveTo(0,2000);
    LineStyleDrawText(label$,height,angle,isAbs);
    


    LineStyleDrawTextBox
    Draw a text string in a rectangular bounding box

    LineStyleDrawTextBox(text$, height, angle, border, isAbs, next_x, next_y, length)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string text$
        The text string to draw
      numeric height
        The font height
      numeric angle
        The angle to draw the text at
      numeric border
        The border offset distance from the text
      numeric isAbs
        Is the angle absolute (0 default)
      numeric variable next_x (オプション)
        The x coordinate for the next string (returned)
      numeric variable next_y (オプション)
        The y coordinate for the next string (returned)
      numeric variable length (オプション)
        The text strings length (returned)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing. The lower left corner of the text label is placed at the current position, and the pen remains there after the text is drawn. The base of the label is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value). The text is drawn using the current font set by the LineStyleSetFont() function and the current color set by the LineStyleSetTextColor() function. The box outline is drawn with the current color set by the LineStyleSetColor function, and is filled with the text fill color set by the LineStyleSetTextColor() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw square point symbol and draw boxed text
    # label with sample number from database field
    # in black on yellow fill
    # Draw red square point symbol
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    LineStyleDrawRectangle(15,15,0,1);
    # Read sample number from database field and convert
    # to text string for use as a label
    label$ = sprintf("%d", Samples.Number);
    # String variable for label text font
    font$ = "ARIALBD.TTF";
    # Define color variables for text
    t_red = 0; t_green= 0; t_blue = 0;
    # Define fill color variables for text box
    fillred = 255; fillgreen = 255; fillblue = 170;
    # Define height, angle, and border width of text
    t_height = 10; angle = 0; # no rotation of label
    border = 2;
    isAbs = 0; # use local coordinate system
    # Set color and font for text label
    LineStyleSetTextColor(t_red,t_green,t_blue,fillred, fillgreen, fillblue);
    LineStyleSetFont(font$);
    # Move pen to right of symbol and draw label
    LineStyleSetColor(0,0,0);
    LineStyleMoveTo(0, 15);
    LineStyleDrawTextBox(label$,t_height,angle,border,isAbs);
    


    LineStyleDrawThreePointArc
    Draw an arc centered at current location and passing through three points referenced from current position

    LineStyleDrawThreePointArc(angle1, dist1, angle2, dist2, angle3, dist3, closemode, dofill)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle1
        The angle to the first point
      numeric dist1
        The distance to the first point
      numeric angle2
        The angle to the second point
      numeric dist2
        The distance to the second point
      numeric angle3
        The angle to the third point
      numeric dist3
        The distance to the third point
      numeric closemode (オプション)
        0 - no close, 1 - close arc, 2 - close arc via center point
      numeric dofill (オプション)
        Set to 1 to fill the arc, 0 otherwise (0 default)

    詳細と仮定

      The pen position is updated to the current line position if necessary before drawing, and is left at the center of the arc after drawing. Direction angles refer to the local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).
      If closemode == 0 AND dofill == 1 the arc will be filled (and thus must be closed)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw arc through listed point positions,
    # closed through the center and filled.
    # Set parameters for arc
    angle1 = 60; dist1 = 20;
    angle2 = 90; dist2 = 30;
    angle3 = 120; dist3 = 40;
    closemode = 2; # close through center
    dofill = 1; # fill closed arc
    LineStyleSetColor(0,0,0);
    LineStyleDrawThreePointArc(angle1,dist1,angle2,dist2,angle3,dist3,closemode,dofill);
    


    LineStyleDropAnchor
    Remember the current 'pen' position (anchor number) for later use

    LineStyleDropAnchor(Anchor)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric Anchor (オプション)
        An anchor id number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw flag symbol with anchor at base.
    # Return to anchor to draw filled rectangle.
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleDropAnchor(1);
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    LineStyleMoveToAnchor(1);
    LineStyleDrawRectangle(10,5,0,1);
    


    LineStyleGetDirection
    Get minimum and maximum direction angles for portion of line starting at current position

    LineStyleGetDirection(distance, minangle, maxangle)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric distance
        The distance along the line
      numeric variable minangle
        The minimum (line direction) angle for this line segment
      numeric variable maxangle
        The maximum (line direction) angle for this line segment

    詳細と仮定

      Direction angles are in the object coordinate reference frame (positive x-axis = 0 degrees).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい


    LineStyleGetDistanceTo
    Distance from current position to specified feature

    LineStyleGetDistanceTo(feature)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric feature
        The feature id number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw solid line with regularly spaced filled
    # squares oriented with bases parallel to local
    # line direction.  Don't draw square within
    # desired spacing distance from end of line.
    # Set parameters for squares
    width = 20; height = width; 
    angle = 0; # no rotation of square
    dofill = 1;
    isAbs = 0; # orient to local coordinate system
    # Set spacing between squares
    spacing = 100;
    # Set line color and width and draw line
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    # Draw square at start of line
    LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
    # Draw rest of squares
    while (LineStyleRoll(spacing) != 1) {
           dist = LineStyleGetDistanceTo(3);
           if ( dist > spacing ) {
                  LineStyleDrawRectangle(width,height,angle,dofill,isAbs);
                  }
           }
    


    LineStyleGetLineCurvature
    Find maximum deviation angles between successive line segments for portion of line element starting at current position.

    LineStyleGetLineCurvature(dist, maxangle, maxleftangle, maxrightangle)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dist
        The distance along the line
      numeric variable maxangle
        The sum of the max left and right angles
      numeric variable maxleftangle (オプション)
        The maximum left angle over the line segment
      numeric variable maxrightangle (オプション)
        The maximum right angle over the line segment

    詳細と仮定

      Left and right sides are relative to line direction from the start point to the end point.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # For vector lines representing fairly
    # straight surface traces of geologic faults
    # determine largest value of maximum deviation
    # angle based on 50-meter segments, and
    # assign different line color for lines
    # exceeding specified maximum curvature value.
    spacing = 50; # length of line to examine
    # Find maximum deviation angle for first segment
    LineStyleGetLineCurvature(spacing,maxangle);
    max = maxangle; # variable to record max deviation
    # Check max deviation angles for remainder of line
    # and record maximum value
    while (LineStyleRoll(spacing) != 1) {
           LineStyleGetLineCurvature(spacing,maxangle);
           if (maxangle > max) then
                  max  = maxangle;
                  }
    # Assign values to color variables based on max
    if (max > 4) then {
           red = 255; green = 0; blue = 0;
           }
    else {
           red = 0; green = 0; blue = 0;
           }
    # Draw solid line with appropriate color
    LineStyleSetColor(red,green,blue);
    LineStyleDrawLine();
    


    LineStyleGetMaxDistance
    Find maximum perpendicular distance from specified portion of line to a straight line joining its start and end points.

    LineStyleGetMaxDistance(dist, direction, maxdist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dist
        The distance along the line
      numeric variable direction
        The direction in degrees (returned)
      numeric variable maxdist
        The maximum perpendicular distance between the specified portion of the line element and a straight line joining its endpoit (returned)

    詳細と仮定

      Direction angles are in the object coordinate reference frame (positive x-axis = 0 degrees).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements as solid lines with
    # regularly spaced filled triangle symbols
    # on left side of line.  Use function to avoid
    # placing triangles on sharp bends of line.
    # Triangle spacing and dimensions
    spacing = 35;
    triWidth = spacing * 0.6;
    halfTri = triWidth * 0.5;
    height = triWidth * 0.6;
    tol = 0.2 * height;
    # Set line color and width and draw line
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleDrawLine();
    # Draw triangles
    while (LineStyleRoll(spacing) != 1) {
           dist = LineStyleGetDistanceTo(3); # distance to end of line
           LineStyleGetMaxDistance(triWidth,angle,maxDist);
           if (dist > triWidth and maxDist < tol) {
                  LineStyleDropAnchor(1);
                  LineStyleRoll(halfTri);
                  LineStyleMoveTo(0,0);
                  LineStyleMoveTo(90, height);
                  LineStyleDropAnchor(2);
                  LineStyleRoll(halfTri);
                  LineStyleDropAnchor(3);
                  LineStyleRecordPolygon();
                  LineStyleMoveToAnchor(2);
                  LineStyleMoveToAnchor(1);
                  LineStyleMoveToAnchor(3);
                  LineStyleDrawPolygon(1);
                  }
           else LineStyleRoll(halfTri);
           }
    


    LineStyleGetPosition
    Record the current line position as a distance from the line beginning

    LineStyleGetPosition(getAbsolute)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric getAbsolute (オプション)
        0 for relative position on the line, 1 for absolute distance from the start in object coordinates

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed line with red color from
    # start to middle and blue color from
    # middle to end
    LineStyleSetLineWidth(2);
    dashSize = 10;
    while (LineStyleRoll(dashSize) != 1) {
           pos = LineStyleGetPosition(0);
           if ( pos <= 0.5) LineStyleSetColor(255,0,0);
           else LineStyleSetColor(0,0,255);
           LineStyleRollPen(dashSize);
           }
    


    LineStyleIsClosed
    Tests the current line closure

    LineStyleIsClosed()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      Line is closed if start and end points have the same coordinates.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw solid line, mark start with red
    # arrow head and end with green filled circle.
    # Omit circle if line forms closed polygon.
    # Set line width, color, and draw solid line
    LineStyleSetLineWidth(2);
    LineStyleSetColor(0,0,0);
    LineStyleDrawLine();
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    LineStyleDrawArrow(0,13,15,60,1);
    if (LineStyleIsClosed() != 1) {
           LineStyleSetPosition(1.0);
           LineStyleSetColor(0,255,0);
           LineStyleDrawCircle(7,1);
           }
    


    LineStyleLineTo
    Draw a line from the current 'pen' position to the specified location

    LineStyleLineTo(angle, dist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        The line direction in degrees
      numeric dist
        The line length

    詳細と仮定

      If the pen position is not coincident with the current position on a line element, the pen is not moved to the current line element position before drawing (unlike most of the other LineStyle drawing functions). This property allows the function to be used to draw a continuous series of line components offset from a vector line element. Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol of triangular flag
    # on vertical pole
    LineStyleSetColor(225,0,0);
    LineStyleSetLineWidth(1);
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    # Example 2 of LineStyleLineTo()
    # Draw line symbol approximating
    # a sine wave for vector line elements.
    # Set line color and width
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    # Set sine wave parameters
    angle = 0;     space = 4;
    # Draw line
    while (LineStyleRoll(space) != 1) {
           angle = angle + 1; # in radians
           a = sin(angle) * 5; # amplitude
           if (a > 0) Then LineStyleLineTo(90,a);
           else LineStyleLineTo(-90,abs(a));
           }
    


    LineStyleLineToAnchor
    Draw a line from the current 'pen' position to the prevously anchored position

    LineStyleLineToAnchor(Anchor)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric Anchor
        The anchor 'id' number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol of unfilled triangle
    # with lower left corner at point position.
    LineStyleSetColor(0,0,255);
    LineStyleSetLineWidth(2);
    LineStyleDropAnchor(0);
    LineStyleLineTo(60,15);
    LineStyleLineTo(-60,15);
    LineStyleLineToAnchor(0);
    


    LineStyleMoveTo
    Move 'pen' (without drawing) to specified location

    LineStyleMoveTo(angle, dist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric angle
        The destination direction in degrees
      numeric dist
        The distance to move

    詳細と仮定

      Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw vector line element as solid
    # line with regularly spaced "X" symbols
    spacing = 30; # spacing between "X" symbols
    length = 12; # length of lines in X
    halfLength = 0.5 * length;
    # Set line width and color
    LineStyleSetLineWidth(2);
    LineStyleSetColor(0,0,255);
    # Draw solid line
    LineStyleDrawLine();
    # Draw "X" symbols
    while (LineStyleRoll(spacing) != 1) {
           LineStyleSetColor(0,0,255);
           LineStyleMoveTo(0,0); # move pen to origin of local coordinate system
           LineStyleMoveTo(45, halfLength);
           LineStyleLineTo(-135, length);
           LineStyleMoveTo(45, halfLength);
           LineStyleMoveTo(-45, halfLength);
           LineStyleLineTo(135, length);
           }
    


    LineStyleMoveToAnchor
    Move 'pen' to specified anchor

    LineStyleMoveToAnchor(Anchor)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric Anchor
        The anchor 'id' number

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol as triangular flag on
    # vertical pole with filled rectangle
    # centered on base.
    # Set line color and width
    LineStyleSetColor(0,255,0);
    LineStyleSetLineWidth(2);
    # Draw flag
    LineStyleDropAnchor(0); # anchor at origin
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    # Move to origin and draw rectangle
    LineStyleMoveToAnchor(0);
    LineStyleDrawRectangle(10,5,0,1);
    


    LineStyleNextVertex
    Move the current 'pen' position to the next vertex on the line element

    LineStyleNextVertex()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw vector line element as solid
    # black line, then mark start with an
    # open red circle and each subsequent
    # vertex with an open green circle
    # Set parameters for circles marking vertices
    radius = 5;    dofill = 0;
    # Draw solid black line
    LineStyleSetLineWidth(3);
    LineStyleSetColor(0,0,0);
    LineStyleDrawLine();
    # draw red circle at beginning of line
    LineStyleSetColor(225,0,0);
    LineStyleDrawCircle(radius,dofill);
    # Move to next vertex and draw green circle
    LineStyleSetColor(0,225,0);
    while ( LineStyleNextVertex() != 1 ) {
           LineStyleDrawCircle(radius,dofill);
           }
    


    LineStylePrevVertex
    Move the current 'pen' position to the previous vertex on the line element

    LineStylePrevVertex()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw vector line element as dashed
    # black line, then mark end with an
    # open red circle and each subsequent
    # vertex with an open green circle
    # Set parameters for circles and dashes
    radius = 5;    dofill = 0; dashSize = 10;
    # Draw dashed black line
    LineStyleSetLineWidth(3);
    LineStyleSetColor(0,0,0);
    while (LineStyleRoll(dashSize) != 1) {
           dist = LineStyleGetDistanceTo(3); # distance to end of line
           if (dist >dashSize) 
           LineStyleRollPen(dashSize);
           else
           LineStyleRollPen(dist);
           }
    # draw red circle at end of line
    LineStyleSetColor(225,0,0);
    LineStyleDrawCircle(radius,dofill);
    # Move to previous vertex and draw green circle
    LineStyleSetColor(0,225,0);
    while ( LineStylePrevVertex() != 1 ) {
           LineStyleDrawCircle(radius,dofill);
           }
    


    LineStyleRecordPolygon
    Start or stop recording a sequence of vertex locations for later use in drawing a polygon or polyline

    LineStyleRecordPolygon(start_stop)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric start_stop (オプション)
        Set to 1 to start recording vertex locations specified by pen movements in subsequent statements

    詳細と仮定

      After using this function to start recording, the end points of subsequent pen movements are recorded as vertex locations. Vertex locations can be indicated by various pen movement functions, including LineStyleLineTo(), LineStyleMoveTo(), LineStyleLineToAnchor(), LineStyleMoveToAnchor(), and LineStyleSideshot(). Use of the LineStyleDrawPolygon() or LineStyleDrawPolyline() functions also stops recording.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol of triangular flag
    # on vertical pole, flag as filled polygon.
    # Set line color and width
    LineStyleSetColor(0,255,0);
    LineStyleSetLineWidth(2);
    # Draw flag
    LineStyleLineTo(90,20);
    LineStyleDropAnchor(1);
    LineStyleRecordPolygon(1);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    LineStyleMoveToAnchor(1);
    LineStyleDrawPolygon(1);
    


    LineStyleRestoreLine
    Restore original line coordinates

    LineStyleRestoreLine()

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

    詳細と仮定

      The current position on the line is not changed.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい


    LineStyleRoll
    Move the current position specified distance along a line (the line is not drawn)

    LineStyleRoll(shift)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric shift
        The distance to move along the line

    詳細と仮定

      The pen position is not changed by this function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed line symbol for line element.
    # Set line color and width
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(2);
    # set dash parameters
    dashSize = 16;
    spacing = 0.6 * dashSize;
    # Draw dashed line
    while (LineStyleRoll(spacing) != 1) {
           LineStyleRollPen(dashSize);
           }
    


    LineStyleRollPen
    Draw a line a specified distance along a line from the current position

    LineStyleRollPen(dist)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dist
        The distance to move along the line

    詳細と仮定

      The pen position is moved to the current line element position if necessary before drawing.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed line symbol for line element.
    # Set line color and width
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(2);
    # set dash parameters
    dashSize = 16;
    spacing = 0.6 * dashSize;
    # Draw dashed line
    while (LineStyleRoll(spacing) != 1) {
           LineStyleRollPen(dashSize);
           }
    


    LineStyleSetCapJoinType
    Set square or rounded ends for lines and polyline segments

    LineStyleSetCapJoinType(capstype, jointype)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric capstype
        Draw square line ends when set to 1, or rounded ends when set to 0 (default).
      numeric jointype
        Draw square line segment ends when set to 1, or rounded line segment ends when set to 0 (default).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw cross point symbol with square line ends
    # Set line color, width, and capstype
    LineStyleSetColor(255,0,255);
    LineStyleSetLineWidth(2);
    LineStyleSetCapJoinType(1,1);
    # Draw cross
    LineStyleDropAnchor(0);
    LineStyleMoveTo(90,10);
    LineStyleLineTo(-90,20);
    LineStyleMoveToAnchor(0);
    LineStyleMoveTo(0,10);
    LineStyleLineTo(180,20);
    


    LineStyleSetColor
    Set RGB color values for line color.

    LineStyleSetColor(red, green, blue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric red
        The red color component (0-255)
      numeric green
        The green color component (0-255)
      numeric blue
        The blue color component (0-255)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw point symbol with red flag and
    # blue filled rectangle at base
    # Set line width and color for flag
    LineStyleSetLineWidth(2);
    LineStyleSetColor(255,0,0);
    # Draw flag
    LineStyleDropAnchor(1);
    LineStyleLineTo(90,20);
    LineStyleLineTo(-30,8);
    LineStyleLineTo(-150,8);
    LineStyleMoveToAnchor(1);
    # Change line color and draw rectangle
    LineStyleSetColor(0,0,255);
    LineStyleDrawRectangle(10,5,0,1);
    


    LineStyleSetCoordType
    Set the coordinate type for input distances

    LineStyleSetCoordType(type)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric type
        0 for OBJECT coordinates, 1 for SCREEN coordinates (mm)

    詳細と仮定

      Setting the coordinate type to millimeters produces symbols with constant size in millimeters regardless of the display scale or print scale.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw filled rectangle point symbol
    # with constant size in millimeters
    # Set dimensions of rectangle
    LineStyleSetCoordType(1);
    width = 4;
    height = 0.5 * width;
    # Set color for rectangle 
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    # Draw rectangle
    LineStyleDrawRectangle(width,height,0,1);
    


    LineStyleSetFont
    Set the font (by name)

    LineStyleSetFont(fontname$)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string fontname$
        The font name to use

    詳細と仮定

      The font can be any installed system font (.ttf) or one of the TNTmips outline fonts (.of).

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw circle point symbols for towns,
    # read town names from database, and draw text
    # labels.
    # Draw red circle point symbol
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(500,1);
    # Read town name from database field to string variable
    label$ = sprintf("%s",TownData.NAME);
    # Set text color and font
    LineStyleSetTextColor(0,0,0);
    LineStyleSetFont("ARIALBD.TTF");
    # Set label parameters
    height = 2000; angle = 0; isAbs = 0;
    # Move pen to right of symbol and draw label
    LineStyleMoveTo(0,2000);
    LineStyleDrawText(label$,height,angle,isAbs);
    


    LineStyleSetLineWidth
    Set the drawing line width

    LineStyleSetLineWidth(width, isInMM)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric width
        The line width in pixels or mm
      numeric isInMM (オプション)
        Set to 1 for mm, 0 for pixels (the default)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements as solid black lines
    # 3 units wide
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(3);
    LineStyleDrawLine();
    


    LineStyleSetPosition
    Move a specified distance along line relative to line length

    LineStyleSetPosition(shift)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric shift
        The line position as a relative distance between 0 (beginning of the line) and 1.0 (end of the line)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line element as solid line with small
    # red circles at start, middle, and end of line.
    # Set radius parameters for circles
    radius = 8; dofill = 0;
    # Set line color and width and draw line
    LineStyleSetColor(0,0,0);
    LineStyleSetLineWidth(4);
    LineStyleDrawLine();
    # Draw small red circle at beginning of line
    LineStyleSetColor(225,0,0);
    LineStyleDrawCircle(radius,dofill);
    # Draw remaining circles
    LineStyleSetPosition(0.5);
    LineStyleDrawCircle(radius,dofill);
    LineStyleSetPosition(1.0);
    LineStyleDrawCircle(radius,dofill);
    


    LineStyleSetScale
    Set a scale factor to be applied to all input distances and lengths

    LineStyleSetScale(scale)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric scale
        The scaling factor (default = 1.0)

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw dashed red line with dash
    # lengths scaled by 0.5
    # Set scale factor
    LineStyleSetScale(0.5);
    # Set color, width, and end type for lines
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleSetCapJoinType(1,1);
    # draw dashed line
    dashSize = 20;
    halfDash = 0.5 * dashSize;
    while (LineStyleRoll(halfDash) != 1) {
           LineStyleRollPen(dashSize);
           }
    


    LineStyleSetTextColor
    Set the text foreground and background colors as RGB

    LineStyleSetTextColor(red, green, blue, bgred, bggreen, bgblue)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric red
        The red component (0-255)
      numeric green
        The green component (0-255)
      numeric blue
        The blue component (0-255)
      numeric bgred (オプション)
        The red component for the background (0-255)
      numeric bggreen (オプション)
        The green component for the background (0-255)
      numeric bgblue (オプション)
        The blue component for the background (0-255)

    詳細と仮定

      Background color is for shadows and "enhancement" outline

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw square point symbol with sample
    # number (from database) in text box
    # Set line color and width and draw square
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(0);
    LineStyleDrawRectangle(15,15,0,1);
    # Read sample number from database field and convert
    # to text string for use as a label
    label$ = sprintf("%d", Samples.Number);
    # String variable for label text font
    font$ = "ARIALBD.TTF";
    # Define color variables for text
    red = 0; green = 0; blue = 0;
    # Define fill color variables for text box;
    bgred = 255; bggreen = 255; bgblue = 170
    # Define height, angle, and border width of text
    t_height = 10; angle = 0; border = 2;
    # Set color and font for text label
    LineStyleSetColor(0,0,0); # color for box outline
    LineStyleSetTextColor(red,green,blue,bgred,bggreen,bgblue);
    LineStyleSetFont(font$);
    # Move pen to right of symbol and draw label
    LineStyleMoveTo(0, 15);
    LineStyleDrawTextBox(label$,t_height,angle,border,0) ;
    


    LineStyleSideshot
    Specify sequence of positions by direction and distance from current pen position

    LineStyleSideshot(dodraw, ...)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric dodraw
        Draw a line connecting the points specified (1 by default)
      numeric ... (オプション)
        A series of point positions specified as Angle, Distance pairs

    詳細と仮定

      Angles and directions refer to the current local coordinate system (local line direction = 0 degrees, positive angles counterclockwise from line). Parameter list can contain any number of paired angle / distance values.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw line elements with regularly
    # repeated diamond symbols.
    LineStyleSetColor(128,128,128);
    # Set dimensions for diamond symbols
    numeric length, width, halfLength, halfWidth, spacing, dodraw;
    length = 15; width = 8;
    halfLength = 0.5 * length;
    halfWidth = 0.5 * width;
    spacing = 25; # spacing between diamond centers
    dodraw = 0;
    while (LineStyleRoll(spacing) != 1) {
           LineStyleMoveTo(0,0);
           LineStyleRecordPolygon(1); # record sideshot points to make polygon
           LineStyleSideshot(dodraw,0,halfLength,90,halfWidth,180,halfLength,-90,halfWidth);
           LineStyleDrawPolygon(1);       # draw and fill diamond polygon
           }
    


    LineStyleSpline
    Spline vector line elements (smooth by inserting additional vertices)

    LineStyleSpline(parameter, method)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric parameter
        The number of knots
      numeric method
        1 == b-spline, 2 == quadritic, 3 == bezier

    詳細と仮定

      This function splines the lines, but does not draw draw them. Use the LineStyleDrawLine() function following splining to draw the splined lines. See the section Vector / Vector Filters / Filter Options / Line Densification in the Process Volume of the TNTmips Reference Manual for a description of the splining methods and their parameters.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Spline lines using BSpline method, with
    # 5 inserted points between each pair of vertices,
    # draw in red.
    numeric parameter = 5, method = 1;
    LineStyleSpline(parameter,method);
    LineStyleSetColor(255,0,0);
    LineStyleSetLineWidth(2);
    LineStyleDrawLine();
    


    LineStyleTextNextPosition
    Compute length and end position of text string

    LineStyleTextNextPosition(text$, height, angle, isAbs, next_x, next_y, length)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      string text$
        The text string
      numeric height
        The font height
      numeric angle
        The angle in degrees
      numeric isAbs
        Local (0) or absolute (1) coordinate
      numeric variable next_x
        The x position for the next text string (returned)
      numeric variable next_y
        The y position for the next text string (returned)
      numeric variable length
        The length of the string (returned)

    詳細と仮定

      The base of the label is initially parallel to the x-axis of the coordinate system (local or object according to the isAbs parameter value). The text string coordinates are computed using the current font set by the LineStyleSetFont() function.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Draw circle point symbols for towns,
    # read town names from database, and draw text
    # labels to the left of the points
    # Draw red circle point symbol
    LineStyleSetColor(255,0,0);
    LineStyleDrawCircle(500,1);
    # Read town name from database field to string variable
    string label$ = sprintf("%s",TownData.NAME);
    # Set text color and font
    LineStyleSetTextColor(0,0,0);
    LineStyleSetFont("ARIALBD.TTF");
    # Set label parameters and find length of text label
    height = 2000; angle = 0; isAbs = 0;
    LineStyleTextNextPosition(label$,height,angle,isAbs,next_x,next_y,length);
    # Move pen to left of symbol and draw label,
    # using length of label to avoid overlap
    LineStyleMoveTo(180,length + 500);
    LineStyleDrawText(label$,height,angle,isAbs);
    


    LineStyleThinLine
    Thin (simplify) vector line elements by removing vertices

    LineStyleThinLine(parameter, method)

    場所:

      カートスクリプト(地図作成用記述言語)

    パラメータ:

      numeric parameter
        The thinning factor
      numeric method
        "Douglas-Peucker" == 1, "Minimum Distance" == 2, "Minimum Ratio" == 3

    詳細と仮定

      This function thins the lines, but does not draw draw them. Use the LineStyleDrawLine() function following thinning to draw the thinned lines. See the section Vector / Vector Filters / Filter Options / Line Simplification in the Process Volume of the TNTmips Reference Manual for a description of the thinning methods and their parameters.

    戻り値

      numeric

    作成日時: 07-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # Thin lines with Douglas-Peucker method
    # using thinning distance of 5
    parameter = 5; method = 1;
    LineStyleSetColor(0,255,0);
    LineStyleThinLine(parameter,method);
    LineStyleDrawLine();
    


    print(value, ...)

    場所:

    パラメータ:

      any value value (オプション)
      any value ... (オプション)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    printf

    printf(format$, value, ...)

    場所:

      印刷

    パラメータ:

      string format$
      any value value (オプション)
      any value ... (オプション)

    戻り値

      なし

    作成日時: 01-Dec-1997
    修正日時: なし
    TNTsml for Windows で使用可能: はい

    例:

    # no sample necessary
    


    Total Number of Functions: 385