Absolute value
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = -6 b = abs(2 * a) # b = 12 print(b)
trigonometric arccosine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
b = acos(0.5) print(b) # b = 1.0471975511965979
trigonometric arccosine (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
hyperbolic arccosine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
b = acosh(0.5) print(b) # b = NULL
hyperbolic arccotangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
b = acoth(0) print(b) # b = NULL
hyperbolic arccosecant
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
b = acsch(0) print(b) # b = Infinity
hyperbolic arcsecant
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
b = asech(1) print(b) # b = 0
trigonometric arcsine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = sqrt(3) / 2 b = deg * asin(a) print(b) # b = 59.99999999999999
trigonometric arcsine (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
hyperbolic arcsine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = (exp(0) - exp(-0)) / 2 b = asinh(a) print(b) # b = 0
trigonometric arctangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = 1 ; b = deg * atan(a) print(b) # b = 45
trigonometric arctangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = sqrt(3) / 2 ; b = -.5 c = deg * atan2(a, b) print(c) # c = 120
trigonometric arctangent (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
hyperbolic arctangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = exp(0) - exp(-0) b = exp(0) + exp(-0) c = atanh(a/b) print(c) # c = 0
Force a value into given range.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of Bound()
Round decimal up to integer
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a = ceil(7.499) # a = 8 b = ceil(7.001) # b = 8 c = ceil(-7.01) # c = -7 d = ceil(-7.99) # d = -7 print(a, b, c, d)
Converts polar coordinates to rectangular (radians).
Where:
Parameters:
Details:
Returns:
Create Date: 16-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertPolartoXY()
Converts polar coordinates to rectangular (degrees).
Where:
Parameters:
Details:
Returns:
Create Date: 16-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertPolartoXYd()
Converts polar coordinates to rectangular (radians).
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertSphericaltoXYZ()
Converts polar coordinates to rectangular (degrees).
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertSphericaltoXYZd()
Converts rectangular coordinates to polar (radians).
Where:
Parameters:
Details:
Returns:
Create Date: 16-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertXYtoPolar()
Converts rectangular coordinates to polar (degrees).
Where:
Parameters:
Details:
Returns:
Create Date: 16-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertXYtoPolard()
Converts rectangular coordinates to spherical (radians).
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertXYZtoSpherical()
Converts rectangular coordinates to spherical (degrees).
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertXYZtoSphericald()
Copies a given range of elements form one array into another.
Where:
Parameters:
Details:
Returns:
Create Date: 22-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
clear(); Array a1[10]; Array a2[10]; for x=1 to 10{ a1[x]=20+x; a2[x]=x; } CopyArrayElements(a2,a1,3,6,5,8); for x=1 to 10{ print(a2[x]); }
trigonometric cosine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(cos(60 / deg)) # prints .500000000000001
trigonometric cosine (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
hyperbolic cosine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(cosh(0)) # prints 1
trigonometric cosecant
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(csc(30 / deg)) # prints 2
trigonometric cosecant (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
trigonometric cotangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(ctn(0 / deg)) # prints Infinity
trigonometric cotangent (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Calculate the distance, azimuth, and elevation from the first point to the second (radians).
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of Displacement3D()
Calculate the distance, azimuth, and elevation from the first point to the second (degrees).
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of Displacement3Dd()
Exponential (e to the power of x)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(exp(-1/0)) # prints 0
Exponential (10 to the power of x)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(exp10(3)) # prints 1000
Round decimal down to integer
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(floor(7.5)) # prints 7 print(floor(-7.5)) # prints -8
Get scale factor for angle unit conversions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetUnitConvAngle()
Get scale factor for area unit conversions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetUnitConvArea()
Get scale factor for distance unit conversions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetUnitConvDist()
Get scale factor for volume unit.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetUnitConvVolume()
Find hypotenuse of right triangle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear(); dx = 3; dy = 4 print(hypot(dx, dy)) # 5
Integer portion of argument (truncate)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() a = int(7.7) # a = 7 a = int(-7.7) # a = -8
Does the argument have the value NULL?
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(IsNull(NULL))
Calculate the linear regression coeficients for a group of points.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LinearRegression()
Natural logarithm of argument
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a number.") ; a=input print("log(x)=", log(x))
Base 10 logarithm of argument
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a number.") ; a=input print("log10(x)=", log10(x))
Computes an equation of given power that best fits the given points.
Where:
Parameters:
Details:
Returns:
Create Date: 22-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of PolynomialCurveFit() clear(); array xpoints[4]; array ypoints[4]; array carray[3]; xpoints[1]=-1; xpoints[2]=0; xpoints[3]=1; xpoints[4]=2; ypoints[1]=4; ypoints[2]=10; ypoints[3]=20; ypoints[4]=34; string$=PolynomialCurveFit(xpoints,ypoints,4,2,carray,r); printf("%s\n",string$); printf("%f %f %f\n",carray[1],carray[2],carray[3]); printf("r = %f\n",r);
return x to the power of y
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(pow(2, 3)) # 8
Returns random value between zero (0) and x
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
print(rand(1))
Computes a pair of random numbers based on a normal distibution.
Where:
Parameters:
Details:
Returns:
Create Date: 21-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RandomGaussian()
Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )
Where:
Parameters:
Details:
Returns:
Create Date: 08-Oct-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ResizeArrayClear() array a[3]; array a2[3, 4]; ResizeArrayClear(a, 5); # increase size of one dimensional array ResizeArrayClear(a, 2); # decrease size of one dimensional array ResizeArrayClear(a2, 5, 6); # increase size of two dimensional array ResizeArrayClear(a2, 2, 3); # decrease size of two dimensional array
Resize a one dimensional array ( a[col] ), or two dimensional array ( a[row, col] )
Where:
Parameters:
Details:
Returns:
Create Date: 08-Oct-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ResizeArrayPreserve() array a[3]; array a2[3, 4]; ResizeArrayPreserve(a, 5); # increase size of one dimensional array ResizeArrayPreserve(a, 2); # decrease size of one dimensional array ResizeArrayPreserve(a2, 5, 6); # increase size of two dimensional array ResizeArrayPreserve(a2, 2, 3); # decrease size of two dimensional array
Round x to nearest integer
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
print(round(10.5)) # 11 print(round(-10.5) #-10
trigonometric secant
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
print(sec(60/deg))
trigonometric secant (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Return -1, 0 or 1 depending on sign of argument
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jun-2000
Modify Date: none
Available in SML for Windows: Yes
trigonometric sine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(sin(30/deg)) #.5
trigonometric sine (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
hyperbolic sine
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(sinh(0)) # 0
Gaussian elimination solution of system of linear equations
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() array a[2, 2] ; array b[2] ; array x[2] a[1,1]=1 ; a[1,2]=0 ; a[2,1]=1; a[2,2]=1 b[1]=1; b[2]=1 Solve(a, b, x) print(x[1], x[2])
Return the square of the argument
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(sqr(-3)) # 9
Returns the (positive) square root of the argument
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(sqrt(9)) # 3 print(sqrt(-9)) # 0
trigonometric tangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(tan(90/deg)) # -2147483648 (roundoff error)
trigonometric tangent (degree version)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
hyperbolic tangent
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(tanh(0)) # 0
Returns the current date in YYYYMMDD format
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() x=Date() ; print(x)
Returns number of days between two dates
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() x=DateDiff(19960101, 19970101) print(x) # 365
Converts YYYYMMDD format to Julian date
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() x=DateToJulian(19960101) print(x) ; print(JulianToDate(x))
Convert a number date to a string.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DateToString()
Returns the current Julian date
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() x=JulianDate() ; print(x)
Converts Julian date to YYYYMMDD format
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() x=DateToJulian(19960101) print(x) ; print(JulianToDate(x))
Most frequently occurring value among arguments
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetMajority(1, 3, 3, 4, 4, 5)) # prints 3
Returns the largest of argument values
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetMax(1, 3, 3, 4, 4, 5)) # prints 5
Returns average of argument values
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetMean(1, 3, 5)) # prints 3
Returns the median of argument values
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetMean(1, 3, 7)) # prints 3
Returns minimum value among arguments
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetMean(1, 3, 5)) # prints 1
Least frequently occurring value among arguments
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetMinority(1, 3, 3, 4, 4, 5)) # prints 1
Returns the total number of elements
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetNum(2, 1, 3, 4, 99)) # returns 5
Returns standard deviation of argument values
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetSD(2, 1, 3, 4, 99))
Returns sum of arguments
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetSum(2, 1, 3, 4, 99)) # prints 109
Returns statistical variance of argument values
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetVariance(2, 1, 3, 4, 99))
Returns number of different values among arguments
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print(SetVariety(2, 1, 3, 4, 99))
Convert an angle in degress to an angle in degress, minutes, seconds format.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear(); print(DegToStr(94.345));
Returns file extension portion of path qualified filename
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FileNameGetExt()
Returns filename portion of path qualified filename
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FileNameGetName()
Returns path portion of path qualified filename
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FileNameGetPath()
Get the nth token from a string
Where:
Parameters:
Details:
Returns:
Create Date: 25-Sep-1998
Modify Date: 05-Jun-2001
Available in SML for Windows: Yes
Example:
# Example of GetToken() clear(); str$ = "a b c,d"; delimit$ = " ,"; n = NumberTokens(str$, delimit$); for i = 1 to n { token$ = GetToken(str$, delimit$, i); print(i, token$); }
Return leftmost n characters of string
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a sentence.") ; a$=input$() print("Enter # of chars to get.")) ; n=input() print(left$(a$, n))
Return n characters of string$ starting at m
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a sentence.") ; a$=input$() print("Enter start position.")) ; m=input() print("Enter # of chars to get.")) ; n=input() print(mid$, m, n))
Returns number of tokens in a string
Where:
Parameters:
Details:
Returns:
Create Date: 25-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NumberTokens() clear(); str$ = "a b c,d"; delimit$ = " ,"; n = NumberTokens(str$, delimit$); for i = 1 to n { token$ = GetToken(str$, delimit$, i); print(i, token$); }
Convert a number to a string
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of NumToStr()
Return right-most n characters of string$
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
a$="Reenter this sentence." print(a$) ; b$=input$() print("Enter n.") n=input() print(right$(a$, n)) print(right$(b$, n))
Assign formatted text to a string variable
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() format$="%s%d%s\n%s" str1$="This is line " ; str2$="you see." str3$="This is line 2" ; number=1 s4$=sprintf(format$, str1$, 1, str2$, str3$) print(s4$)
Returns number of characters in string variable
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a string. ") ; a$=input$() print(strlen(a$))
Return numerical value of string with number in it
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a string. ") ; a$=input$() b=StrToNum(a$) ; print(b/10)
Convert string to lower case
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of tolower$()
Convert string to upper case
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of toupper$()
Get database table information
Where:
Parameters:
Details:
Returns:
Create Date: 29-May-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DatabaseGetTableInfo()
Returns a field class.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of FieldGetInfoByName()
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of FieldGetInfoByNumber()
Returns number of records in database table
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(V) # assume you know the table name, here we used the # Crow Butte Soils Vector object. Note that 'YIELD' # is the correct field name,not 'yield'. n=NumRecords(V.poly.YIELD) print("Record count:", n)
Open the database subobject of a CAD object
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jun-2000
Modify Date: none
Available in SML for Windows: Yes
Example:
XXX
Open a main level database
Where:
Parameters:
Details:
Returns:
Create Date: 11-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenDatabase()
Returns a database class for functions that need one.
Where:
Parameters:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenRasterDatabase()
Open the database subobject of a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jun-2000
Modify Date: none
Available in SML for Windows: Yes
Returns a database class for functions that need one.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenVectorLineDatabase()
Open a Vector point database
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenVectorPointDatabase()
Returns a database class for functions that need one.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenVectorPolyDatabase()
Delete one or more records.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RecordDelete()
Append a field to a table
Where:
Parameters:
Details:
Returns:
Create Date: 08-Jun-2001
Modify Date: none
Available in SML for Windows: Yes
Add a new field of type float but inserts it before field "before".
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableAddFieldFloat()
Add a new field of type integer but inserts it before field "before".
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableAddFieldInteger()
Add a new field of type string.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableAddFieldString()
Copy a database table to a DBASE file
Where:
Parameters:
Details:
Returns:
Create Date: 11-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableCopyToDBASE()
Creates an empty table. Use TableAddField???() functions to add fields to it.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableCreate()
returns 1 if table exists, -1 if table doesn't exist
Where:
Parameters:
Details:
Returns:
Create Date: 27-Nov-2000
Modify Date: none
Available in SML for Windows: Yes
Example:
XXX
Returns a table class.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableGetInfo() # (Assume Vect is a vector object) class DBTABLEINFO table; table = TableGetInvo(Vect.poly.YIELD); # Another example: tablename$ = "YIELD"; table = TableGetInfo(Vect.poly.(tablename$));
Add a new field of type float but inserts it before field "before".
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableInsertFieldFloat()
Add a new field of type integer but inserts it before field "before".
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableInsertFieldInteger()
Add a new field of type string but inserts it before field "before".
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableInsertFieldString()
Find the first record in a table that matches a given key
Where:
Parameters:
Details:
Returns:
Create Date: 13-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableKeyFieldLookup()
Makes a link to a dBase file.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableLinkDBASE()
Add new record to a database
Where:
Parameters:
Details:
Returns:
Create Date: 29-May-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableNewRecord()
Open a database table
Where:
Parameters:
Details:
Returns:
Create Date: 26-May-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableOpen()
Returns records that are attached to or related to a given element in a object
Where:
Parameters:
Details:
Returns:
Create Date: 14-Nov-2000
Modify Date: none
Available in SML for Windows: Yes
Example:
XXX
Read a number from a table (using DBTABLEINFO)
Where:
Parameters:
Details:
Returns:
Create Date: 12-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableReadFieldNum()
Read a string from a table (using DBTABLEINFO)
Where:
Parameters:
Details:
Returns:
Create Date: 12-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableReadFieldStr()
Attaches records in a table to an element in a object
Where:
Parameters:
Details:
Returns:
Create Date: 14-Nov-2000
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example: # Have the user select a vector object. # attach records 5 and 7 to polygon number 12. VECTOR Vect; class DBTABLEINFO table; array records[2]; GetInputVector(Vect); table = TableGetInfo(Vect.poly.YIELD); records[1] = 5; records[2] = 7; TableWriteAttachment(table, 12, records, 2, "polygon");
Write values to an existing database record
Where:
Parameters:
Details:
Returns:
Create Date: 15-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TableWriteRecord()
Adjust point position of Raster to match known position in refererence Raster
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of AreaCorrAdjustPoint() clear(); GetInputRaster(Rs); GetInputRaster(Rd); xS = 55; yS = 60; xD = 50; yD = 63; sourceSize = 21; targetSize = 50; cor = AreaCorrelatePoint(Rs, xS, yS, Rd, xD, yD, sourceSize, targetSize); print(xS, yS, xD, yD, cor);
Calculates a raster binarization on an 8 or 4 bit raster
Where:
Parameters:
Details:
Returns:
Create Date: 15-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
clear(); array myarray[15]; for x=1 to 15{ myarray[x]=80+x; } OpenRaster(Rvar, "c:/tnt/testdata.rvc", "GREEN"); Binarization(Rvar, "c:/tnt/testdata.rvc", "binaryout", myarray, 1); OpenRaster(Rout, "c:/tnt/testdata.rvc", "binaryout"); handle=DispOpen(750,550); DispQuickAddRasterVar(handle, Rout); DispRedraw(handle); CloseRaster(Rvar); CloseRaster(Rout);
Close an open raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() OpenRaster(Rvar) Rvar[1, 1] = 42 ; print(Rvar[1, 1]) CloseRaster(Rvar)
Get horizontal size of raster cell
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(A) print(ColScale(A))
Compute Raster attribute tables from a Vector object
Where:
Parameters:
Details:
Returns:
Create Date: 11-Aug-1998
Modify Date: 08-Jul-1999
Available in SML for Windows: Yes
Example:
# Example of ComputeRasterProperties() OpenRaster(R, "c:/tnt/win32/CB_tm.rvc", "BLUE"); OpenRaster(R1, "c:/tnt/win32/CB_tm.rvc", "RED"); OpenRaster(R2, "c:/tnt/win32/CB_tm.rvc", "GREEN"); OpenVector(V, "c:/tnt/win32/vector.rvc", "VectorObject"); ComputeRasterProperties(R, V, "TableName", "Description", "IncludeAll", "ComputeHistogram", R1, R2);
Compute slope/aspect/shading from elevation Raster
Where:
Parameters:
Details:
Returns:
Create Date: 22-Dec-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ComputeSlopeAspectShading() inputFile$ = "c:/cb_tm.rvc"; inputRaster$ = "ELEVATION"; outputFile$ = "c:/SAS.rvc"; rescaleSlope = 1; numberSlopeCells$ = "4 neighbor"; slopeTypeDegrees$ = "Degrees"; rescaleAspect = 1; horizontalScale = 30.0; verticalScale = 30.0; elevationScale = 1.0; sunElevationAngle = 50.0; sunDirection = 45.0; ComputeSlopeAspectShading(inputFile$, inputRaster$, outputFile$, rescaleSlope, numberSlopeCells$, slopeTypeDegrees$, rescaleAspect, horizontalScale, verticalScale, elevationScale, sunElevationAngle, sunDirection);
Converts the color depth of a raster to another color depth.
Where:
Parameters:
Details:
Returns:
Create Date: 06-Aug-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertCompToComp clear(); OpenRaster(Rvar, "c:/tnt/samp.rvc", "COMP24"); ConvertCompToComp(Rvar, "c:/tnt/samp.rvc", "conv8", 8); OpenRaster(Ovar, "c:/tnt/samp.rvc", "conv8"); handle=DispOpen(750,550); DispQuickAddRasterVar(handle, Ovar); DispRedraw(handle); CloseRaster(Rvar); CloseRaster(Ovar);
Converts and RGB raster to an 8 or 4 bit composite
Where:
Parameters:
Details:
Returns:
Create Date: 28-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
clear(); OpenRaster(Rvar, "c:/tnt/samp.rvc", "RED"); OpenRaster(Gvar, "c:/tnt/samp.rvc", "GREEN"); OpenRaster(Bvar, "c:/tnt/samp.rvc", "BLUE"); ConvertRGBToComposite(Rvar, Gvar, Bvar, "c:/tnt/samp.rvc", "composite", 16, 8, 2); OpenRaster(Ovar, "c:/tnt/samp.rvc", "composite"); handle=DispOpen(750,550); DispQuickAddRasterVar(handle, Ovar); DispRedraw(handle); CloseRaster(Rvar); CloseRaster(Gvar); CloseRaster(Bvar); CloseRaster(Ovar);
Create a histogram for a Raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(R) CreateHistogram(R) CloseRaster(R)
Create a pyramid version of Rvar and store it as Rvar
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) CreatePyramid(R) CloseRaster(R)
Create a new raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() file$="c:/temp.rvc" obj$="TempRast" ; description$="temporary raster for test" lin = 1024 ; col = 512 ; type$="8-bit unsigned" CreateRaster(Rvar, file$, obj$, description$, lin, col, type$) print(NumLins(Rvar), NumCols(Rvar)) # do some things to Rvar CloseRaster(Rvar)
Crete a binary mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CreateRasterBinaryMask()
Create a Raster to match a given Object.
Where:
Parameters:
Details:
Returns:
Create Date: 29-Apr-1998
Modify Date: 29-Apr-1998
Available in SML for Windows: Yes
Example:
# example of CreateRasterFromObject() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateBlankRasterFromObject(V, R, "c:/tnt/win32/projects/vtor/RasOut.rvc", "VtoR", "Raster from Vector", 30, 30, "8-bit unsigned", georef); R = 0 # zero out the Raster CloseRaster(R); CloseVector(V); print("done");
Crete a mask raster (for use as a transparancy mask)
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CreateRasterMask()
Create a raster in RAM
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() lin = 1024 ; col = 512 ; type$="8-bit unsigned" CreateTempRaster(Rvar, lin, col, type$) print(NumLins(Rvar), NumCols(Rvar)) # do some things to Rvar CloseRaster(Rvar)
Delete contrast subobjects of raster Rvar
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() DeleteContrast(Rvar)
Delete histogram subobject of raster Rvar
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() DeleteHistogram(Rvar)
Delete pyramid subobject of raster Rvar
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() DeletePyramid(Rvar)
Delete a raster that has been created with CreateTempRaster()
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() lin = 1024 ; col = 512 ; type$ = "8-bit unsigned" CreateTempRaster(A, lin, col, type$) # do something with A DeleteTempRaster(A)
Use a File/Object selection dialog to select an input Raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
lines=488 ; columns=361 # Crow Butte TM raster dimensions type$="8-bit unsigned" # allow only specific raster size and type GetInputRaster(R, lines, columns, type$) ; CloseRaster(R) # allow any size, but only a specific type GetInputRaster(R, 0, 0, type$) ; CloseRaster(R)
Get more than one raster.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetInputRasters()
Use a File/Object selection dialog to select an output Raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(R) lines=NumLins(R) ; columns=NumCols(R) ; type$=RastType(R) # allow selection or creation of a raster identical # in size and type to R. GetOutputRaster(R2, lines, columns, type$) CloseRaster(R) ; CloseRaster(R2)
Does a raster object have an assigned NULL value?
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) if (HasNull(R) then print("R has a NULL value.") else print("R does not have a NULL value.") # The last line is always executed - it's not in the loop. CloseRaster(R)
Do not report NULLs in raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) if (HasNull(R)) then begin print("R has a NULL value.") print("\nIt is now ignored.") IgnoreNull(R) end else begin print("R has no NULL value.") print("That's all, folks.") end # The last line is always executed - it's not in the loop. CloseRaster(R)
Vertical size of raster cell
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) a=LinScale(R) ; print("Line scale is:", a) CloseRaster(R)
Computes coefficients of multilinear regression equations on a set of rasters
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() # clear the console h1 = CreateMatrix(3, 4) # holds the results # get three input rasters to do multiregression on GetInputRaster(Rr) # get red input raster GetInputRaster(Rg) # get green input raster GetInputRaster(Rb) # get blue input raster # do the multi-regression - result in h1 MultiRegression(h1, Rr, Rg, Rb) print("Multi-Regression Output") for r = 0 to 2 { for c = 0 to 3 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } CloseRaster(Rr) # do clean up CloseRaster(Rg) CloseRaster(Rb) DestroyMatrix(h1)
Value (if any) assigned as NULL for a raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) n=NullValue(R) ; print("Null value is",n) CloseRaster(R)
Number of columns in a raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) columns=NumCols(R) print("Number of columns:", columns) CloseRaster(R)
Number of lines (rows) in a raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) lines=NumLins(R) print("Number of lines:", lines) CloseRaster(R)
Open an existing raster file, putting it in Raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() OpenRaster(R, "c:/data/cb_tm.rvc", "blue") # or OpenRaster(R, "c:\\data\\cb_tm.rvc", "blue") print("Line count: ", NumLines(R))
Open a raster given object from SelectInputObject()
Where:
Parameters:
Details:
Returns:
Create Date: 18-Nov-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenRasterObject()
Computes principal component transformation matrix for a set of rasters
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() # clear the console # create the transformation matrices # to send to principal companent function forwardMat = CreateMatrix(3, 3) inverseMat = CreateMatrix(3, 3) # outMat = (forward * inMat) inMat = CreateMatrix(3, 1) # use to calculate the transformation outMat = CreateMatrix(3, 1) # get three input rasters to do principal components on # get red input raster GetInputRaster(Rr) GetInputRaster(Rg) # get green input raster GetInputRaster(Rb) # get blue input raster # create the rasters to hold principal components # output values will contain negative numbers so # allways use signed type GetOutputRaster(R1, NumLins(Rr), NumCols(Rr), "64-bit float") GetOutputRaster(R2, NumLins(Rr), NumCols(Rr), "64-bit float") GetOutputRaster(R3, NumLins(Rr), NumCols(Rr), "64-bit float") # get the tranformation matrices PrincipleComponents(forwardMat, inverseMat, Rr, Rg, Rb) # print the forward matrix print("Forward matrix") for r = 0 to 2 { for c = 0 to 2 { a = GetMatrixItem(forwardMat, r, c) printf("%8.4f ", a) } print(" ") } # print the inverse matrix print("Inverse matrix") for r = 0 to 2 { for c = 0 to 2 { a = GetMatrixItem(inverseMat, r, c) printf("%8.4f ", a) } print(" ") } # now compute the principal component values # for each point in raster numColumns = NumCols(Rr) numLines = NumLins(Rr) for r = 1 to NumLins(Rr) { for c = 1 to NumCols(Rr) { SetMatrixItem(inMat, 0, 0, Rr[r,c]) SetMatrixItem(inMat, 1, 0, Rg[r,c]) SetMatrixItem(inMat, 2, 0, Rb[r,c]) MultiplyMatrix(outMat, forward, inMat) R1[r,c] = GetMatrixItem(outMat, 0, 0) R2[r,c] = GetMatrixItem(outMat, 1, 0) R3[r,c] = GetMatrixItem(outMat, 2, 0) } } # do clean up CloseRaster(Rr) CloseRaster(Rg) CloseRaster(Rb) CloseRaster(R1) CloseRaster(R2) CloseRaster(R3) DestroyMatrix(forwardMat) DestroyMatrix(inverseMat) DestroyMatrix(inMat) DestroyMatrix(outMat)
Compute principle components and statistics
Where:
Parameters:
Details:
Returns:
Create Date: 21-Dec-2000
Modify Date: none
Available in SML for Windows: Yes
Applies a contrast table to a raster.
This function is obsolete. Use RasterApplyContrast2() instead.
Where:
Parameters:
Details:
Returns:
Create Date: 11-Aug-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterApplyContrast clear(); OpenRaster(Rvar, "c:/tnt/samp.rvc", "RED"); RasterApplyContrast(Rvar, "c:/tnt/samp.rvc", "contsamp", "equalize"); OpenRaster(Ovar, "c:/tnt/samp.rvc", "contsamp"); handle=DispOpen(750,550); DispQuickAddRasterVar(handle, Ovar); DispRedraw(handle); CloseRaster(Rvar); CloseRaster(Ovar);
Applies a contrast table to a raster.
Where:
Parameters:
Details:
Returns:
Create Date: 11-Oct-2001
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterApplyContrast2 GetInputRaster(Rvar); GetOutputRaster(OutRast, NumLins(Rvar), NumCols(Rvar), "8-bit unsigned"); RasterApplyContrast2(Rvar, OutRast, "Subobject");
Determine if a Raster exists. Made obsolete by ObjectExists()
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RasterExists()
Creates Rasters that are linear combinations of input Rasters
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# creating and filling in the transform matrix # # the matrix size is determined by the number # of input and output rasters: # number of columns = number of input rasters + 1 # number of rows = number of output rasters # column 1 hold offset coefficients # columns 2 to (N + 1) hold the coeffients for the N # output rasters # in general if: # N = number of output rasters, M = number of input rasters # # OutRasterN[r,c] = transformMatrix[N-1,0] # + transformMatrix[N-1,1] * # InRaster1[r,c] # + transformMatrix[N-1,2] * # InRaster2[r,c] # + ... # + transformMatrix[N-1,M] * # InRasterM[r,c] # # our matrix will be: # | 0.0 .213 .715 .072 | - coeff. for the first raster # | 0.0 .333 .333 .333 | - coeff. for the second raster # # our output rasters are created using these formulas: # # Lcombo1[r,c] = 0.0 + (.213 * Rred[r,c]) # + (.715 * Rgreen[r,c]) # + (.072 + Rblue[r,c]) # # Lcombo2[r,c] = 0.0 + (.333 * Rred[r,c]) # + (.333 * Rgreen[r,c]) # + (.333 + Rblue[r,c]) # # Compute brightness Raster from rgb rasters # the coefficents are only approximate, correct for NTSC(1953) # set up variables to hold values for flags flagNoAutoscale = 0 flagAutoscale = 1 outRVCFile$ = "c:/tnt/win32/Tntdata/cb_data/cb_tm.rvc" # get the input rasters OpenRaster(Rred, outRVCFile$, "RED") OpenRaster(Rgreen, outRVCFile$, "GREEN") OpenRaster(Rblue, outRVCFile$, "BLUE") numInputRasters = 3 numOutputRasters = 2 transform = CreateMatrix(numOutputRasters, numInputRasters) # output Raster one # set matrix items (coefficients) equal to correct # red, green, and blue contributions to brightness SetMatrixItem(transform, 0, 0, 0.0) # sets offset to zero SetMatrixItem(transform, 0, 1, .212) # red SetMatrixItem(transform, 0, 2, .715) # green SetMatrixItem(transform, 0, 3, .072) # blue # output Raster two # other method to compute brightness - not as good # set coefficients for average of red, green, and blue # sets offset to zero SetMatrixItem(transform, 1, 0, 0.0) SetMatrixItem(transform, 1, 1, .333) # red SetMatrixItem(transform, 1, 2, .333) # green SetMatrixItem(transform, 1, 3, .333) # blue flags = 0 # no auto scale RasterLinearCombination(transform, outRVCFile$, "Lcombo", "Linear Combinations Test :", flags, Rred, Rgreen, Rblue) DestroyMatrix(transform) CloseRaster(Rred) CloseRaster(Rgreen) CloseRaster(Rblue)
Computes viewshed from elevation Raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# computes viewshed for all points on all lines # of a corresponding Vector object # could use to get viewshed for all points # on one or more roads array xArray[10], yArray[10] # use to hold line points clear() # clear the console # get the input and output raster and Vector object GetInputRaster(Rin) GetInputVector(V) GetOutputRaster(Rout) # get georef object id's for raster and vector georefR = GetLastUsedGeorefObject(Rin) georefV = GetLastUsedGeorefObject(V) # first count total number of points in all lines numLines = NumVectorLines(V) numberPoints = 0 for thisLine = 1 to numLines { numPointsInThisLine = GetVectorLinePointList(V, xArray, yArray, thisLine) numberPoints += numPointsInThisLine } # now create matrices large enough to hold points matX = CreateMatrix(1, numberPoints) matY = CreateMatrix(1, numberPoints) # now loop through lines and fill in matrices with points currentPoint = 0 # this will be our matrix index for thisLine = 1 to numLines { numPointsInThisLine = GetVectorLinePointList(V, xArray, yArray, thisLine) for i = 1 to numPointsInThisLine { # convert vector coordinates to georef ObjectToMap(V, xArray[i], yArray[i], georefV, xVector, yVector) # convert vector coordinates to raster # coordinates # note the order of rCol and rLine # col = x coord, row = y coord MapToObject(georefR, xVector, yVector, Rin, rCol, rLine) # force to upper left corner rLine = floor(rLine) rCol = floor(rCol) # want matrix to index from zero to numberPoints SetMatrixItem(matX, 0, currentPoint, rCol) SetMatrixItem(matY, 0, currentPoint, rLine) currentPoint += 1 } # end of for I } # end of for each line in V # set default values - want any one view point to make # "visible" percent = 100 / numberPoints height = 0 zScale = 1 # now create the viewshed Raster object RasterToBinaryViewshed(Rin, Rout, numberPoints, matX, matY, percent, height, zScale) # clean up GeorefFree(georefR) # must free up id's GeorefFree(georefV) DestroyMatrix(matX) DestroyMatrix(matY) CloseRaster(Rin) CloseRaster(Rout)
Returns data type code of a raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) print(RastType(R)) CloseRaster(R)
Read raster's histogram into array
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R, 0, 0, "8-bit unsigned") array histo[256] ReadHistogram(R, histo) for i=0 to 255 print(i, histo[i]) CloseRaster(R)
Copies, transforms and resamples cells to new raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() linscale = 30 # meters colscale = 30 # meters ResampleRasterToCellSize(Rin, Rout, linscale, colscale, \ "affine", "cubic"$)
Create a new raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(Rin); GetInputRaster(Rref); lin=NumLins(Rref); col=NumCols(Rref); type$=RastType(Rref); printf("Enter new null value: "); newNull=input(255); GetOutputRaster(Rout, lin, col, type$); SetNull(Rout, newNull); model$="affine"; method$="nearest neighbor"; ResampleRasterToMatch(Rin, Rref, Rout, model$, method$); CloseRaster(Rin); CloseRaster(Rref); CloseRaster(Rout);
Popup dialog to select an object
Where:
Parameters:
Details:
Returns:
Create Date: 18-Nov-1998
Modify Date: 17-May-2000
Available in SML for Windows: Yes
Example:
# Example of SelectInputObject()
Assign NULL value of Raster to be x
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R, 0, 0, "8-bit unsigned") x=PopupNum("Enter integer.", 0, 0, 255, 0) SetNull(R, x) CloseRaster(R)
Assign vertical and horizontal cell size
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R, 0, 0, "8-bit unsigned") h=PopupNum("Enter h scale.", 0, 0, 255, 0) v=PopupNum("Enter v scale.", 0, 0, 255, 0) SetScale(R, h, v) CloseRaster(R)
Recognize and use assigned NULL value of raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) if (PopupYesNo("UseNull?", 1)) then UseNull(R) CloseRaster(R)
Close a Vector object.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of CloseVector() GetInputVector(V); # do something with V CloseVector(V);
Create a temporary Vector object.
Where:
Parameters:
Details:
Returns:
Create Date: 10-Apr-1998
Modify Date: 19-May-1998
Available in SML for Windows: Yes
Example:
# Example of CreateTempVector() CreateTempVector(VTemp) # do something with it CloseVector(VTemp)
Create a Vector without using a dialog using same flags as GetOutputVector().
Where:
Parameters:
Details:
Returns:
Create Date: 07-May-1998
Modify Date: 19-May-1998
Available in SML for Windows: Yes
Example:
# Example of CreateVector() CreateVector(Vpoly, "c:/tnt/win32/createV.rvc", "Vpoly", "Polygonal", "Polygonal") CreateVector(Vplanar, "c:/tnt/win32/createV.rvc", "Vplanar", "Planar", "Planar") CreateVector(Vnetwork, "c:/tnt/win32/createV.rvc", "Vnetwork", "Network", "Network") CreateVector(Vnotopo, "c:/tnt/win32/createV.rvc", "Vnotopo", "NoTopology", "NoTopology")
Find closest Vector label.
Where:
Parameters:
Details:
Returns:
Create Date: 22-Jun-1981
Modify Date: 24-Jun-1999
Available in SML for Windows: Yes
Example:
# example of FindClosestLabel() GetOutputVector(VIn, 1) georef = GetGeorefObject(VIn) numberLabels = NumVectorLabels(VIn) label = FindClosestLabel(VIn, 150000, 335000, georef, 1000000) VectorDeleteLabel(Vin, label) print("number, closest", numberLabels, label)
Return line element closest to x,y coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: 24-Jun-1999
Available in SML for Windows: Yes
Example:
clear() GetInputVector(Vvar) georef = GetGeorefObject(Vvar) print("Enter x.") ; x = input() print("Enter y.") ; y = input() print("Enter maxDistance.") ; maxDistance = input() num = FindClosestLine(Vvar, x, y, georef, maxDistance) print(num)
Return node element closest to x,y coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: 24-Jun-1999
Available in SML for Windows: Yes
Example:
clear() GetInputVector(Vvar) georef = GetGeorefObject(Vvar) print("Enter x.") ; x = input() print("Enter y.") ; y = input() print("Enter maxDistance.") ; maxDistance = input() num=FindClosestNode(Vvar, x, y, georef, maxDistance) print(num)
Return point element closest to x,y coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: 24-Jun-1999
Available in SML for Windows: Yes
Example:
clear() GetInputVector(Vvar) georef = GetGeorefObject(Vvar) print("Enter x.") ; x = input() print("Enter y.") ; y = input() print("Enter maxDistance.") ; maxDistance = input() num = FindClosestPoint(Vvar, x, y, georef, maxDistance) print(num)
Return polygon element closest to x,y coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: 24-Jun-1999
Available in SML for Windows: Yes
Example:
clear() GetInputVector(Vvar) georef = GetGeorefObject(Vvar) print("Enter x.") ; x = input() print("Enter y.") ; y = input() print("Enter maxDistance.") ; maxDistance = input() num=FindClosestPoly(Vvar, x, y, georef, maxDistance) print(num)
Use a File/Object selection dialog to select an input Vector
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputVector(Vvar) # do something with it
Get multiple Vector objects.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetInputVectorList()
Open a vector object for use with vector toolkit funtions
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10] clear() # for multiple flags simply comma seperate them as below GetOutputVector(V, "VectorToolkit", "NoQtree,NoDBStatTable") # draw some boxes - this will create polygons # all closed lines are converted to polygons xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 xPoints[5] = 0 yPoints[5] = 0 VectorAddLine(V, 5, xPoints, yPoints) # now add some points for i = 1 to 4 { VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150) } numPolys = NumVectorPolys(V) numberPoints = NumVectorPoints(V) print("number of polygons, points: ", numPolys, numberPoints)
Returns (via arrays xArray and yArray, and optional zArray) a list of points in a line.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xArray[10], yArray[10], zArray[10] # will be resized automatically GetInputVector(Vvar) numLines = NumVectorLines(Vvar) nPoints = GetVectorLinePointList(Vvar, xArray, yArray, 1, zArray) for i = 1 to nPoints { print(xArray[i], yArray[i], zArray[i]) }
Returns (via array linesArray) a list of lines attached to node.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() array linelist[10] # will be resized automatically GetVectorNodeLineList(Vvar, linelist, 1)
Returns list of all polygons that share a common line with a given polygon in a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# reads the poly list of all adjacent polygons to a given polygon # it only returns polygons that have common lines !!! # not a single common node array polygonList[10] # array to hold poly list clear() GetInputVector(V) polygonNumber = 150 # polygonNumber = 150 works for cb_soils/CBSOILS_Lite numadjacent = GetVectorPolyAdjacentPolyList(V, polygonList, polygonNumber) temp$ = "number of polygons adjacent to polygon:" print(temp$, polygonNumber, " = ", numadjacent) for i = 1 to numadjacent { print(i, ":", polygonList[i]) } print("Done")
Returns (via array islandsArray) a list of islands of a polygon.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() array islandlist[10] # will be resized automatically GetVectorPolyIslandList(Vvar, islandlist, 1)
Returns (via array linesArray) a list of lines forming a polygon
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() array linelist[10] # will be resized automatically GetVectorPolyLineList(Vvar, linelist, 1)
Returns number of labels in a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(Vin) numLabels = NumVectorLabels(Vin) print("number of labels: ", numLabels)
Returns number of lines in vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(V) n=NumVectorLines(V) print("Line count: ", n)
Returns number of nodes in vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(V) n=NumVectorNodes(V) print("Node count: ", n)
Returns number of points in vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(V) n=NumVectorPoints(V) print("Point count: ", n)
Returns number of polygons in vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(V) n=NumVectorPolys(V) print("Polygon count: ", n)
Open multiple Vector objects
Where:
Parameters:
Details:
Returns:
Create Date: 19-May-1998
Modify Date: 19-May-1998
Available in SML for Windows: Yes
Example:
# Example of OpenInputVectorList()
Open a Vector without using a dialog using same flags as GetOutputVector().
Where:
Parameters:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of OpenVector() fileName$ = "c:/tnt/win32/vcBound/bound/Create.rvc" objectName$ = "VCreate" OpenVector(VOut, fileName$, objectName$, "VectorToolkit")
Merge two or more Vector objects
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of VectMerge()
Returns Vector that is the logical result of two input vectors
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
See example for VectorOR()
Tests a Vector element against a region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of VectorElementInRegion() clear() GetInputVector(VIn) GetInputRegion(Region1) elementNumber = 1 inRegion = VectorElementInRegion(Region1, VIn, elementNumber, "line", "CompletelyInside") if (inRegion) print( "element ", elem, "is CompletelyInside\n")
Determines if vector object exists in project file. Made obsolete by ObjectExists()
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() file$="d:/sf_data/haywsoil" ; ob$="hsoils" if (VectorExists(file$, ob$)) then print("Vector ", ob$, "Exists in ", file$)
Returns Vector that is the result of the operator applied to the source
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# get the input vectors GetInputVector(Voperator) GetInputVector(Vsource) # get the output vector GetOutputVector(Vout1) # use default flags Vout1 = VectorExtract(Voperator, Vsource, "PartInside") GetOutputVector(Vout2) operation$ = "CompInside" flags$ = "TableRemoveDupRec,RemExRecords" # using optional flags (example showing two flags) Vout2 = VectorExtract(Voperator, Vout1, operation$, flag$)
Returns Vector that is the logical result of two input vectors
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Returns Vector that is the logical result of two input vectors
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
See sample for VectorOR()
Returns Vector that is the logical result of two input vectors
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
See example for VectorOR()
Initialize an open Vector object for use with vector toolkit functions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of VectorToolkitInit()
Returns Vector that is the logical result of two input vectors
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
See example for VectorOR()
Close an open style object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CloseStyleObject()
Copy object and all of its subobjects.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
srcfile$="/data/standard/cb_tm.rvc" destfile$="/data/standard/temp.rvc" CopyObject(srcfile$, 1, destfile$, 1)
same as CopyObject() except no subobjects are copied.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
srcfile$="/data/standard/cb_tm.rvc" destfile$="/data/standard/temp.rvc" CopyObject(srcfile$, 1, destfile$, 1)
Copy raster subobjects from Source to Target
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(A) GetOutputRaster(B, NumLins(A), NumCols(A), RastType(A)) CopySubobjects(A, B) CloseRaster(A) ; CloseRaster(B)
Create a project file
Where:
Parameters:
Details:
Returns:
Create Date: 02-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CreateProjectFile() CreateProjectFile("c:/ProjName.rvc", "Project file created in SML");
Deletes an object, (and all subobjects), by object number
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
fileName$="/data/standard/cb_tm.rvc" DeleteObject(fileName$, 1)
Deletes subobjects from raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() DeleteSubobjects(Rvar, "Pyramid")
Determines if object exists in project file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() array objnums[10]; max = GetAllObjectNumbers("c:/tnt/benchmarks/benchmrk.sml",objnums,"Raster"); print(max); for x=1 to max { print (objnums[x]); }
Gets the description of an object by object number
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
fileName$="/data/standard/cb_tm.rvc" GetObjectDescription(fileName$, 1)
Returns the x and y extents for a CAD, TIN, vector, or raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() # vector object GetInputVector(V) GetObjectExtents(V, xMin, yMin, xMax, yMax) print("vector extents xMin, yMin, xMax, yMax") printf("%10.2f %10.2f %10.2f %10.2f \n", xMin, yMin, xMax, yMax) vGeoref = GetLastUsedGeorefObject(V) GetObjectExtents(V, xMin, yMin, xMax, yMax, vGeoref) print("vector extents xMin, yMin, xMax, yMax") printf("%10.2f %10.2f %10.2f %10.2f \n", xMin, yMin, xMax, yMax)
Get the extents of an object as a region
Where:
Parameters:
Details:
Returns:
Create Date: 16-Feb-2000
Modify Date: none
Available in SML for Windows: Yes
Returns the path qualified RVC file name for an object.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rin) # get the RVC file name str$ = GetObjectFileName(Rin) objNum = GetObjectNumber(Rin) print("Raster Object Number: ", objNum, "RVC file Name: ", str$) GetInputVector(Vin) # get the RVC file name str$ = GetObjectFileName(Vin) objNum = GetObjectNumber(Vin) print("Vector Object Number: ", objNum, "RVC file Name: ", str$) GetInputTIN(Tin) # get the RVC file name str$ = GetObjectFileName(Tin) objNum = GetObjectNumber(Tin) print("TIN Object Number: ", objNum, "RVC file Name: ", str$)
Gets the name of an object by object number
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
fileName$="/data/standard/cb_tm.rvc" GetObjectName(fileName$, 1)
Returns the object number for a Raster, Vector, TIN, or CAD object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rin) # get the RVC file name str$ = GetObjectFileName(Rin) objNum = GetObjectNumber(Rin) print("Raster Object Number: ", objNum, "RVC file Name: ", str$) GetInputVector(Vin) # get the RVC file name str$ = GetObjectFileName(Vin) objNum = GetObjectNumber(Vin) print("Vector Object Number: ", objNum, "RVC file Name: ", str$) GetInputTIN(Tin) # get the RVC file name str$ = GetObjectFileName(Tin) objNum = GetObjectNumber(Tin) print("Tin Object Number: ", objNum, "RVC file Name: ", str$)
Get the number of bytes in an object
Where:
Parameters:
Details:
Returns:
Create Date: 18-Dec-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GetObjectSize()
Returns the z extents for a CAD, TIN, or vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() # vector object GetInputVector(V) GetObjectZExtents(V, zMin, zMax) print("vector z extents - zMin, zMax") printf("%10.2f %10.2f \n", zMin, zMax)
Creates a folder in an RVC project.
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
MakeRVCFolder("c:/tnt/testdata.rvc","NickFolder","A folder for Nick","Users");
Determines if object exists in project file
Where:
Parameters:
Details:
Returns:
Create Date: 24-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
clear() file$="d:/sf_data/haywsoil" ; ob$="hsoils" if (ObjectExists(file$, ob$)) then print("Object ", ob$, "Exists in ", file$)
Returns an object number used by several object and display functions
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() fileName$="/data/standard/cb_tm.rvc" obname$="TM_2" objectNumberber=ObjectNumber(fileName$, obname$, "raster") GetObjectDescription(fileName$, objectNumberber)
Open a style object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenStyleObject()
Open a style subobject
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of OpenStyleSubObject()
Reads an objects metadata as a string
Where:
Parameters:
Details:
Returns:
Create Date: 05-Jan-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ReadMetaData()
Changes the description of an object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
fileName$="/data/standard/cb_tm.rvc" obname$="TM_2" objectNumberber=ObjectNumber(fileName$, obname$, "raster") SetObjectDescription(fileName$, objectNumberber, "TM Band 2")
Returns an object number used by several object and display functions
(similar to ObjectNumber() but looks under "parent" object for valid subobject)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
fileName$="/data/standard/cb_tm.rvc" obname$="TM_2" objectNumberber=ObjectNumber(fileName$, obname$, "raster") subobjectNumber=SubObjectNumber(fileName$, objectNumberber, \ "histogram1","HISTO") DeleteObject(fileName$, subobjectNumber) # delete histogram
Writes metadata to an object
Where:
Parameters:
Details:
Returns:
Create Date: 05-Jan-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of WriteMetaData()
Adds two matrices - (matrixOut = matrixLeft + matrixRight)
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create three matrices h2 = CreateMatrix(2, 2) h3 = CreateMatrix(2, 2) # fill the matrices with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) SetMatrixItem(h2, r, c, (r + c) * 2) SetMatrixItem(h3, r, c, (r + c) * 3) } } # now add h1 to h2, result is h3 AddMatrix(h3, h1, h2) # print the resulting matrix h3 print("add h1 + h2") for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h3, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrices DestroyMatrix(h1) DestroyMatrix(h2) DestroyMatrix(h3)
Adds scalar to each element of a matrix
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrix with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } # print the matrix print("original matrix") for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } AddMatrixScaler(h1, 100.0) # add 100.0 to each element # print the resulting matrix print("after adding 100.0 to each element") for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrix DestroyMatrix(h1)
Creates a matrix - returns a valid matrix handle
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrices with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } print("Printing the matrix:") # print the matrix for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrix DestroyMatrix(h1)
Destroys a previously created matrix
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrices with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } print("Printing the matrix:") # print the matrix for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrix DestroyMatrix(h1)
Returns the number of columns in a matrix
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
# # proc printMatrixToConsole(matHandle, formatStr$) # # procedure to print out a matrix to console - row major order # parameters: # matHandle a matrix handle # format$ string to control output format # proc printMatrixToConsole(matHandle, formatStr$) { # print the matrix handle printf("%s%d\n", "Matrix: ", matHandle) # get the size of the matrix lastRow = GetMatrixRowSize(matHandle) - 1 lastCol = GetMatrixColSize(matHandle) - 1 for row = 0 to lastRow { for col = 0 to lastCol { printf(formatStr$, GetMatrixItem(matHandle, row, col)) } print(" ") } print(" ") # print blank line after matrix output } # end of proc printMatrix() # start of code clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrix with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } # call procedure printMatrixToConsole() printMatrixToConsole(h1, "%8.4f ") # destroy the matrix DestroyMatrix(h1)
Returns value of matrix element
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
# # proc printMatrixToConsole(matHandle, formatStr$) # # procedure to print out a matrix to console - row major order # parameters: # matHandle a matrix handle # format$ string to control output format # proc printMatrixToConsole(matHandle, formatStr$) { # print the matrix handle printf("%s%d\n", "Matrix: ", matHandle) # get the size of the matrix lastRow = GetMatrixRowSize(matHandle) - 1 lastCol = GetMatrixColSize(matHandle) - 1 for row = 0 to lastRow { for col = 0 to lastCol { printf(formatStr$, GetMatrixItem(matHandle, row, col)) } print(" ") } print(" ") # print blank line after matrix output } # end of proc printMatrix() # start of code clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrix with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } # call procedure printMatrixToConsole() printMatrixToConsole(h1, "%8.4f ") # destroy the matrices DestroyMatrix(h1)
Returns the number of rows in a matrix
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
# # proc printMatrixToConsole(matHandle, formatStr$) # # procedure to print out a matrix to console - row major order # parameters: # matHandle a matrix handle # format$ string to control output format # proc printMatrixToConsole(matHandle, formatStr$) { # print the matrix handle printf("%s%d\n", "Matrix: ", matHandle) # get the size of the matrix lastRow = GetMatrixRowSize(matHandle) - 1 lastCol = GetMatrixColSize(matHandle) - 1 for row = 0 to lastRow { for col = 0 to lastCol { printf(formatStr$, GetMatrixItem(matHandle, row, col)) } print(" ") } printf(" ") # print blank line after matrix output } # end of proc printMatrix() # start of code clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrix with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } # call procedure printMatrixToConsole() printMatrixToConsole(h1, "%8.4f ") # destroy the matrices DestroyMatrix(h1)
Inverts a matrix
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
# # proc printMatrixToConsole(matHandle, formatStr$) # # procedure to print out a matrix to console - row major order # parameters: # matHandle a matrix handle # format$ string to control output format # proc printMatrixToConsole(matHandle, formatStr$) { # print the matrix handle printf("%s%d\n", "Matrix: ", matHandle) # get the size of the matrix lastRow = GetMatrixRowSize(matHandle) - 1 lastCol = GetMatrixColSize(matHandle) - 1 for row = 0 to lastRow { for col = 0 to lastCol { printf(formatStr$, GetMatrixItem(matHandle, row, col)) } print(" ") } print(" ") # print blank line after matrix output } # end of proc printMatrix() # start of program clear() h1 = CreateMatrix(2, 2) # create three matrices h2 = CreateMatrix(2, 2) h3 = CreateMatrix(2, 2) # fill the matrices values known to produce matrix # with an inverse SetMatrixItem(h1, 0, 0, 1.0) SetMatrixItem(h1, 0, 1, 2.0) SetMatrixItem(h1, 1, 0, 3.0) SetMatrixItem(h1, 1, 1, 4.0) # print the resulting matrix print("matrix before inverse") printMatrixToConsole(h1, "%8.4f ") # now calculate the inverse of h1 InvertMatrix(h2, h1) # print the inverse matrix # result should be | -2.0 1.0 | # | 1.5 -.5 | print("matrix after inverse") printMatrixToConsole(h2, "%8.4f ") # now multiply matrix 1 by it's inverse # result matrix h3 should be identity matrix MultiplyMatrix(h3, h1, h2) print("matrix times its inverse") printMatrixToConsole(h3, "%8.4f ") # destroy the matrices DestroyMatrix(h1) DestroyMatrix(h2) DestroyMatrix(h3)
Multiplies two matrices - (matrixOut = matrixLeft * matrixRight)
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
# # proc printMatrixToConsole(matHandle, formatStr$) # # procedure to print out a matrix to console - row major order # parameters: # matHandle a matrix handle # format$ string to control output format # proc printMatrixToConsole(matHandle, formatStr$) { # print the matrix handle printf("%s%d\n", "Matrix: ", matHandle) # get the size of the matrix lastRow = GetMatrixRowSize(matHandle) - 1 lastCol = GetMatrixColSize(matHandle) - 1 for row = 0 to lastRow { for col = 0 to lastCol { printf(formatStr$, \ GetMatrixItem(matHandle, row, col)) } print(" ") } print(" ") # print blank line after matrix output } # end of proc printMatrix() # start of program clear() h1 = CreateMatrix(2, 2) # create three matrices h2 = CreateMatrix(2, 2) h3 = CreateMatrix(2, 2) # create a matrix to test # result should be | 1 2 | # | 3 4 | SetMatrixItem(h1, 0, 0, 1.0) SetMatrixItem(h1, 0, 1, 2.0) SetMatrixItem(h1, 1, 0, 3.0) SetMatrixItem(h1, 1, 1, 4.0) # print the resulting matrix print("Original matrix:") printMatrixToConsole(h1, "%8.4f ") # create an identity matrix # result should be | 1 0 | # | 0 1 | SetMatrixItem(h2, 0, 0, 1.0) SetMatrixItem(h2, 0, 1, 0.0) SetMatrixItem(h2, 1, 0, 0.0) SetMatrixItem(h2, 1, 1, 1.0) # print the resulting matrix print("Identity matrix:") printMatrixToConsole(h2, "%8.4f ") # now multiply h1 by the h2 (identity matrix) # result in h3 MultiplyMatrix(h3, h2, h1) # print the result - should be same as original print("Matrix after multiplication by identity:") printMatrixToConsole(h3, "%8.4f ") # destroy the matrices DestroyMatrix(h1) DestroyMatrix(h2) DestroyMatrix(h3)
Multiplies each element of a matrix by a scaler
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrix with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } # print the matrix print("original matrix") for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } # multiply each element by 100.0 MultiplyMatrixScaler(h1, 100.0) # print the resulting matrix print("After multiplying each element by 100.0") for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrix DestroyMatrix(h1)
Sets the element of a matrix to a value.
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create a matrix # fill the matrix with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) } } # print the matrix print("The matrix:") for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h1, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrix DestroyMatrix(h1)
Subtracts two matrices - (matrixOut = matrixLeft - matrixRight)
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
clear() h1 = CreateMatrix(2, 2) # create three matrices h2 = CreateMatrix(2, 2) h3 = CreateMatrix(2, 2) # fill the matrices with some values for r = 0 to 1 { for c = 0 to 1 { SetMatrixItem(h1, r, c, r + c) SetMatrixItem(h2, r, c, (r + c) * 2) SetMatrixItem(h3, r, c, (r + c) * 3) } } # now subtract h2 from h1, result is h3 SubMatrix(h3, h1, h2) print("Subtract h2 from h1") # print the resulting matrix h3 for r = 0 to 1 { for c = 0 to 1 { a = GetMatrixItem(h3, r, c) printf("%8.4f ", a) } print(" ") } # destroy the matrices DestroyMatrix(h1) DestroyMatrix(h2) DestroyMatrix(h3)
Transposes rows and columns of a matrix
Where:
Parameters:
Details:
Returns:
Create Date: 20-Oct-1997
Modify Date: 08-Mar-1999
Available in SML for Windows: Yes
Example:
# # proc printMatrixToConsole (matHandle, formatStr$) # # procedure to print out a matrix to console - row # major order # parameters: # matHandle a matrix handle # format$ string to control output format # proc printMatrixToConsole(matHandle, formatStr$) { # print the matrix handle printf("%s%d\n", "Matrix: ", matHandle) # get the size of the matrix lastRow = GetMatrixRowSize(matHandle) - 1 lastCol = GetMatrixColSize(matHandle) - 1 for row = 0 to lastRow { for col = 0 to lastCol { printf(formatStr$, \ GetMatrixItem(matHandle, row, col)) } print(" ") } print( " " ) # print blank line after matrix output } # end of proc printMatrix() # start of program clear() h1 = CreateMatrix(2, 2) # create two matrices h2 = CreateMatrix(2, 2) # fill the matrix with some values SetMatrixItem(h1, 0, 0, 1.0) SetMatrixItem(h1, 0, 1, 2.0) SetMatrixItem(h1, 1, 0, 3.0) SetMatrixItem(h1, 1, 1, 4.0) # print the resulting matrix # result should be | 1 2 | # | 3 4 | print("matrix before transpose") printMatrixToConsole(h1, "%8.4f ") # now calculate the transpose of h1 TransposeMatrix(h2, h1) # print the inverse matrix # result should be | 1 3 | # | 2 4 | print("matrix after transpose") printMatrixToConsole(h2, "%8.4f ") # destroy the matrices DestroyMatrix(h1) DestroyMatrix(h2)
Write a georeference subobject
Where:
Parameters:
Details:
Returns:
Create Date: 18-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CopyGeorefToObject()
Creates a control point georeference object.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# SML script to demonstrate creation of georef object in SML # # 1. opens a raster - cb_tm/blue # 2. creates a new vector object and draws a box # 3. georeferences the vector so that it bounds the raster # # NOTES: # 1. you must use a minimum of three control points # 2. they must not be all on the same line! # ################################################################# # alternate method to get extents of object # # can use this in general - if last parm is omitted then # returns object coordinates # # rgeoref = GetLastUsedGeorefObject(Rin) # GetObjectExtents(Rin, rxMin, ryMin, rxMax, ryMax, rgeoref) # # now do same for vector except do not use georef parm # this will give object coordinates # GetObjectExtents(Vout, vxMin, vyMin, vxMax, vyMax) # ################################################################# # the source arrays will hold the object coordinates # for a raster this would be cell values # for vector, CAD, TIN it would be object, (non-georeferenced), # coordinates array xsrc[5], ysrc[5], zsrc[5] # the destination arrays will hold the appropriate, # (georeferenced), values array xdest[5], ydest[5], zdest[5] # arrays to hold vector points to draw box array xpoints[10] array ypoints[10] # fill in the control points (source and destination) # need a minimum of three # we will assume a georeferenced raster and a non-georeferenced # vector that we wish to georeference to the raster clear() # get the raster and vector GetInputRaster(Rin) # get number of lines and columns numlines = NumLins(Rin) numcols = NumCols(Rin) # get the upper left (UL), lower right (LR) # upper right (UR), and lower left (LL) coordinates rgeoref = GetLastUsedGeorefObject(Rin) ObjectToMap(Rin, 0, 0, rgeoref, xUL, yUL) ObjectToMap(Rin, numcols, numlines, rgeoref, xLR, yLR) ObjectToMap(Rin, numcols, 0, rgeoref, xUR, yUR) ObjectToMap(Rin, 0, numlines, rgeoref, xLL, yLL) printf("UL: %7.2f %7.2f\n", xUL, yUL) printf("UR: %7.2f %7.2f\n", xUR, yUR) printf("LL: %7.2f %7.2f\n", xLL, yLL) printf("LR: %7.2f %7.2f\n", xLR, yLR) # create a new vector here !!!! # we will draw a box and match it to the raster GetOutputVector(Vout, "VectorToolkit") # draw the box - this will create a polygon # fill in the points xpoints[1] = 0 ypoints[1] = 0 xpoints[2] = 100 ypoints[2] = 0 xpoints[3] = 100 ypoints[3] = 100 xpoints[4] = 0 ypoints[4] = 100 xpoints[5] = 0 ypoints[5] = 0 VectorAddLine(Vout, 5, xpoints, ypoints) # fill in four control points - one for each corner # the source values are for the vector # control point 1 - upper left corner xsrc[1] = 0 ysrc[1] = 100 zsrc[1] = 0 xdest[1] = xUL ydest[1] = yUL zdest[1] = 0 # control point 2 - lower right corner xsrc[2] = 100 ysrc[2] = 0 zsrc[2] = 0 xdest[2] = xLR ydest[2] = yLR zdest[2] = 0 # control point 3 - upper right corner xsrc[3] = 100 ysrc[3] = 100 zsrc[3] = 0 xdest[3] = xUR ydest[3] = yUR zdest[3] = 0 # control point 3 - lower left corner xsrc[4] = 0 ysrc[4] = 0 zsrc[4] = 0 xdest[4] = xLL ydest[4] = yLL zdest[4] = 0 # print out the control points for i = 1 to 4 { printf("%s %2d %7.2f %7.2f %7.2f ", "i: xsrc, ysrc, zsrc, xdest, ydest, zdest ", i, xsrc[i], ysrc[i], zsrc[i]) printf("%7.2f %7.2f %7.2f\n", xdest[i], ydest[i], zdest[i]) } # set number of control points numberPoints = 4 # now create the georef via dialog CreateControlPointGeoref(Vout, numberPoints, xsrc, ysrc, zsrc, xdest, ydest, zdest) GeorefFree(rgeoref) # clean up CloseRaster(Rin)
Same as CreateControlPointGeoref but without accuracy parameters
Where:
Parameters:
Details:
Returns:
Create Date: 16-May-2001
Modify Date: none
Available in SML for Windows: Yes
Creates a control point georeference object using an existing georeference for the projection system.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateControlPointGeorefFromGeoref() array xsrc[5], ysrc[5], zsrc[5] array xdest[5], ydest[5], zdest[5] clear() # get the raster GetInputRaster(RIn) #create a new raster CreateRaster(RNew, "c:/tnt/win32/newras.rvc", "newras", "description", 200, 200, "8-bit unsigned"); # duplicate the corrosponding values for r = 1 to 200 { for c = 1 to 200 { RNew[r,c] = RIn[r,c]; } } # get number of lines and columns numlines = NumLins(RIn) numcols = NumCols(RIn) # get the upper left (UL), lower right (LR) # upper right (UR), and lower left (LL) coordinates # of the portion of the raster we are going to duplicate geoOrg = GetLastUsedGeorefObject(RIn) ObjectToMap(RIn, 0, 0, geoOrg, xUL, yUL) ObjectToMap(RIn, 200, 200, geoOrg, xLR, yLR) ObjectToMap(RIn, 200, 0, geoOrg, xUR, yUR) ObjectToMap(RIn, 0, 200, geoOrg, xLL, yLL) printf("UL: %7.2f %7.2f\n", xUL, yUL) printf("UR: %7.2f %7.2f\n", xUR, yUR) printf("LL: %7.2f %7.2f\n", xLL, yLL) printf("LR: %7.2f %7.2f\n", xLR, yLR) # fill in four control points - one for each corner # control point 1 - upper left corner xsrc[1] = 0 ysrc[1] = 0 zsrc[1] = 0 xdest[1] = xUL ydest[1] = yUL zdest[1] = 0 # control point 2 - lower right corner xsrc[2] = 200 ysrc[2] = 200 zsrc[2] = 0 xdest[2] = xLR ydest[2] = yLR zdest[2] = 0 # control point 3 - upper right corner xsrc[3] = 200 ysrc[3] = 0 zsrc[3] = 0 xdest[3] = xUR ydest[3] = yUR zdest[3] = 0 # control point 3 - lower left corner xsrc[4] = 0 ysrc[4] = 200 zsrc[4] = 0 xdest[4] = xLL ydest[4] = yLL zdest[4] = 0 # print out the control points for i = 1 to 4 { printf("%s %2d %7.2f %7.2f %7.2f ", "i: xsrc, ysrc, zsrc, xdest, ydest, zdest ", i, xsrc[i], ysrc[i], zsrc[i]) printf("%7.2f %7.2f %7.2f\n", xdest[i], ydest[i], zdest[i]) } # set number of control points numpoints = 4 # now create the georef without dialog geoNew = CreateControlPointGeorefFromGeoref(RNew, geoOrg, numpoints, xsrc, ysrc, zsrc, xdest, ydest, zdest) GeorefFree(geoOrg) GeorefFree(geoNew) CloseRaster(RIn); CloseRaster(RNew);
Create an implied georeference subobject
Where:
Parameters:
Details:
Returns:
Create Date: 16-May-2000
Modify Date: none
Available in SML for Windows: Yes
Delete georef subobjects of raster Rvar
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() DeleteGeoref(Rvar)
Returns number of a new georeference subobject
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() geonum1 = GeorefAlloc() ; geonum2 = GeorefAlloc() print(geonum1, geonum2) GeorefFree(geonum1) ; GeorefFree(geonum2)
Returns the angle between north and a line from center to x,y
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) georef = GetGeorefObject(R) print("Enter x value.") ; x = input() print("Enter y value.") ; y = input() angle = GeorefAngleToNorth(georef, x, y) print("Angle between line connecting center of object ", "to x,y and true north:",angle/deg) CloseRaster(R)
Free georeference object with num as its ID
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() geonum = GeorefAlloc() ; print(geonum) GeorefFree(geonum)
Open dialog for selecting georeference subobject
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) # get input raster g = GetGeorefObject(R) # get georeference of object # change parameters of that georeference and # copy the results to a new ID h = GeorefGetParms(g) print(g, h) GeorefFree(g) ; CloseRaster(R)
Set the projection of a Georef
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GeorefSetProjection()
Transform point to new georeferenced value
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) g1 = GetGeorefObject(R) print("Enter x1") ; input x1 print("Enter x2") ; input x2 g2 = GeorefGetParms() GeorefTrans(g1, x1, y1, g2, x2, y2) print("Original: ", x1, y1) print("\nNew: ", x2, y2) GeorefFree(g) ; CloseRaster(R)
Return ID number of named georeference subobject
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(R) g=GetGeorefObject(R) # get georeference, change projection GeorefGetParms(g) # Do something with the georef here GeorefFree(g)
Return number of a most recently used georeference subobject
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(R) g=GetLastUsedGeorefObject(R) # get most recent georeference # Translate top left corner of raster to # map coordinates last used by R ObjectToMap(R, 0, 0, g, s, y) print("Top left corner is at\nLat: ", y, "\nlon: ", x) GeorefFree(g) ; CloseRaster(R)
Transform georeferenced location from map coordinates to object coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) g=GetGeorefObject(R) print("Enter x1.") ; input(x1) print("Enter y1.") ; input(y1) MapToObject(g, x1, y1, R, x2, y2) print("Map: ", x1, y1) ; print("/nObject: ", x2, y2) GeorefFree(g) ; CloseRaster(R)
Transform object coordinates to georeferenced location
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) g=GetGeorefObject(R) print("Enter ox.") ; input(x1) print("Enter oy.") ; input(y1) ObjectToMap(g, x1, y1, R, x2, y2) print("Object: ", ox,o y) ; print("/nMap: ", mx, my) GeorefFree(g) ; CloseRaster(R)
Compute distance in meters between two points in specified projection. If the coordinate system is Latitude-Longitude the distance along a geodetic is returned (actual distance over curved surface).
Where:
Parameters:
Details:
Returns:
Create Date: 09-Jan-2001
Modify Date: none
Available in SML for Windows: Yes
Reads the control points of the last used georeference attached to an object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ReadControlPoints() array xS[5], yS[5], zS[5], xD[5], yD[5], zD[5] clear(); GetInputRaster(R); numPoints = ReadControlPoints(R, xS, yS, zS, xD, yD, zD); for i = 1 to numPoints { print(xS[i], yS[i], zS[i], " - ", xD[i], yD[i], zD[i]); }
Transform 2D point using transparm
Where:
Parameters:
Details:
Returns:
Create Date: 22-May-1998
Modify Date: 22-May-1998
Available in SML for Windows: Yes
Example:
# Example of TransPoint2D()
Write control points to the last used georeference attached to an object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of WriteControlPoints() array xS[5], yS[5], zS[5], xD[5], yD[5], zD[5] xS[1] = 0; yS[1] = 0; zS[1] = 0; xD[1] = 333354; yD[1] = 162833; zD[1] = 0; xS[2] = 361; yS[2] = 488; zS[2] = 0; xD[2] = 343050; yD[2] = 148559; zD[2] = 0; xS[3] = 0; yS[3] = 488; zS[3] = 0; xD[3] = 332803; yD[3] = 148958; zD[3] = 0; xS[4] = 361; yS[4] = 0; zS[4] = 0; xD[4] = 343000; yD[4] = 162000; zD[4] = 0; GetInputRaster(R); WriteControlPoints(R, 4, xS, yS, zS, xD, yD, zD);
Read colormap from under raster.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ColorMapFromRastVar()
Get a color from a colormap
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ColorMapGetColor()
Set a colormap color given a class color structure.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ColorMapSetColor()
Set a colormap color to given HIS values.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ColorMapSetColorHIS()
Set a colormap color to given RGB values.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ColorMapSetColorRGB()
Write a colormap under a raster.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ColorMapWriteToRastVar()
Read a BITMAPPATTERN from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadBitmapPattern()
Read a LINEPATTERN from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadLinePattern()
Read a line style from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 28-Sep-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadLineStyle()
Read a point style from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 28-Sep-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadPointStyle()
Read a POINTSYMBOL from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadPointSymbol()
Read a polygon style from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 28-Sep-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadPolyStyle()
Read a text style from a style object
Where:
Parameters:
Details:
Returns:
Create Date: 28-Sep-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StyleReadTextStyle()
Add a user defined callback
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of AddCallback()
Exit the script (calls functions registered with OnExit).
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of Exit()
Register function to call just before script exits.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of OnExit()
Runs another command
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
run("something", 0) # run in background
Runs application associated with passed file
Where:
Parameters:
Details:
Returns:
Create Date: 18-Oct-2000
Modify Date: none
Available in SML for Windows: Yes
Example:
RunAssociatedApplication("c:/temp/sample.txt"); # Opens sample.txt with associated application
Run an SML script
Where:
Parameters:
Details:
Returns:
Create Date: 08-May-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RunSML()
Pause execution for a number of seconds.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of sleep()
Suspend script but process callbacks and events.
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of WaitForExit()
Convert a binary raster to a region
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of BinaryRasterToRegion()
Convert Cyan-Magenta-Yellow-Black to Red-Green-Blue
Where:
Parameters:
Details:
Returns:
Create Date: 08-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertCMYKtoRGB() clear(); c = 100; m = 100; y = 100; k = 101; ConvertCMYKtoRGB(255, c, m, y, k, red, green, blue); format$ = "%3d %3d %3d %3d - %3d %3d %3d" printf(format$, c, m, y, k, red, green, blue);
Convert hue, brightness, saturation to red, green, blue
Where:
Parameters:
Details:
Returns:
Create Date: 13-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertHBStoRGB() h = 180; b = 50; s = 50; ConvertHBStoRGB(h, s, v, r, g, b); printf("hbs - rgb %3d %3d %3d - %3d %3d %3d\n", h, s, v, r, g, b);
Convert from hue, intensity, saturation to red, green, blue
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# rgbhis.sml # convert between rgb and his # each function also takes a maximum rgb value for proper scaling # max for 8-bit unsigned = 255 # max for 16-bit unsigned = 65535 clear() maxrgb = 255 for h = 1 to 360 step 179 { for i = 1 to 100 step 49 { for s = 1 to 100 step 49 { ConvertHIStoRGB(maxrgb, h, i, s, r, g, b) printf("%s: %6d %6d %6d %6d %6d %6d \n", "his -> rgb", h, i, s, r, g, b) } } } for r = 1 to 255 step 100 { for g = 1 to 255 step 100 { for b = 1 to 255 step 100 { ConvertRGBtoHIS(maxrgb, r, g, b, h, i, s) printf("%s: %6d %6d %6d %6d %6d %6d \n", "rgb -> his", r, g, b, h, i, s) } } }
Convert hue, saturation, value to red, green, blue
Where:
Parameters:
Details:
Returns:
Create Date: 10-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertHSVtoRGB() h = 180; s = 50; v = 50; ConvertHSVoRGB(h, s, v, r, g, b); printf("hsv - rgb %3d %3d %3d - %3d %3d %3d\n", h, s, v, r, g, b);
Converts a Region to a Vector.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertRegionToVect()
Convert red, green, blue, to hue, brightness, saturation
Where:
Parameters:
Details:
Returns:
Create Date: 13-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertRGBtoHBS() r = 127; g = 127; b = 127; ConvertRGBtoHBS(r, g, b, h, s, v) printf("rgb - hbs %3d %3d %3d - %3d %3d %3d\n", r, g, b, h, s, v);
Convert from red, green, blue to hue, intensity, saturation
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# rgbhis.sml # convert between rgb and his # each function also takes a maximum rgb value for proper scaling # max for 8-bit unsigned = 255 # max for 16-bit unsigned = 65535 clear() maxrgb = 255 for h = 1 to 360 step 179 { for i = 1 to 100 step 49 { for s = 1 to 100 step 49 { ConvertHIStoRGB(maxrgb, h, i, s, r, g, b) printf("%s: %6d %6d %6d %6d %6d %6d \n", "his -> rgb", h, i, s, r, g, b) } } } for r = 1 to 255 step 100 { for g = 1 to 255 step 100 { for b = 1 to 255 step 100 { ConvertRGBtoHIS(maxrgb, r, g, b, h, i, s) printf("%s: %6d %6d %6d %6d %6d %6d \n", "rgb -> his", r, g, b, h, i, s) } } }
Convert red, green, blue to hue, saturation, value
Where:
Parameters:
Details:
Returns:
Create Date: 10-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ConvertRGBtoHSV() r = 127; g = 127; b = 127; ConvertRGBtoHBS(r, g, b, h, s, v) printf("rgb - hsv %3d %3d %3d - %3d %3d %3d\n", r, g, b, h, s, v);
Converts selected Vector elements to a region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of ConvertVectorPolysToRegion() array polygonList[10] polygonList[1] = 2 polygonList[2] = 4 numberPolygons = 2 GetInputVector(VIn) georef = GetLastUsedGeorefObject(VIn) GetOutputRegion(RegionOut) RegionOut = ConvertVectorPolysToRegion(Vin, georef, polygonList, numberPolygons)
Converts single polygon to a region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of ConvertVectorPolyToRegion() # convert single polygon to a region GetInputVector(VIn) GetOutputRegion(RegionOut) # convert first polygon RegionOut = ConvertVectorPolyToRegion(VIn, 1)
Converts a Vector to a Region.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# example of ConvertVectToRegion() GetInputVector(VIn) georef = GetLastUsedGeorefObject(VIn) GetOutputRegion(Region1) Region1 = ConvertVectToRegion(VIn)
Convert 24 bit composite Raster to RGB
Where:
Parameters:
Details:
Returns:
Create Date: 13-May-1998
Modify Date: 19-May-1998
Available in SML for Windows: Yes
Example:
# example of RasterCompositeToRGB() OpenRaster(C1, "c:/tnt/win32/projects/rgbcomp/input.rvc", "_24BIT_RGB"); RasterCompositeToRGB(C1, R1, G1, B1, "c:/tnt/win32/projects/rgbcomp/output.rvc", "from _24BIT_RGB"); RasterRGBToComposite(R1, G1, B1, CompOut, "c:/tnt/win32/projects/rgbcomp/composite.rvc", "comp", "composite from RGB");
Convert RGB Rasters to 24 bit composite
Where:
Parameters:
Details:
Returns:
Create Date: 13-May-1998
Modify Date: 19-May-1998
Available in SML for Windows: Yes
Example:
# Example of RasterRGBToComposite() OpenRaster(C1, "c:/tnt/win32/projects/rgbcomp/input.rvc", "_24BIT_RGB"); RasterCompositeToRGB(C1, R1, G1, B1, "c:/tnt/win32/projects/rgbcomp/output.rvc", "from _24BIT_RGB"); RasterRGBToComposite(R1, G1, B1, CompOut, "c:/tnt/win32/projects/rgbcomp/composite.rvc", "comp", "composite from RGB");
Convert Raster to Vector boundary.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RasterToCADBound() GetInputRaster(RIn) GetOutputCAD(COut) COut = RasterToCADBound(RIn)
Convert Raster to CAD lines.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of RasterToCADLine() GetInputRaster(RIn) GetOutputCAD(COut) thinFactor = 1 traceValue = 1 COut = RasterToCADLine(RIn, thinFactor, traceValue)
Converts elevation raster to TIN object as contour lines
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# set up variables to hold flag values flagDefault = 0 flagComputeStatistics = 1 flagDoTINOptimize = 2 GetInputRaster(Rin) GetOutputTIN(Tout) range = GlobalMax(Rin) - GlobalMin(Rin) zTolerance = range / 100 maxNodes = 1000 zDelta = 0 shortEdge = 0 longEdge = 0 flags = 0 Tout = RasterToTINIterative(Rin, zTolerance, maxNodes, zDelta, shortEdge, longEdge, flags) CloseRaster(Rin)
Convert Raster to Vector boundary.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RasterToVectorBound() GetInputRaster(RIn) GetOutputVector(VOut) flag = 0 VOut = RasterToVectorBound(RIn, flag)
Converts elevation raster to vector object as contour lines
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# set up variables to hold flag values flagDefault = 0 flagLogScale = 1 flagBicubicInterpolate = 2 flagUseSmoothing = 4 GetInputRaster(Rin) GetOutputVector(Vout) zStart = GlobalMin(Rin) # set range to raster limits zEnd = GlobalMax(Rin) range = zEnd - zStart zInterval = range / 40 # set 40 contours zScale = 1 zOffset = 0 sampleRate = 1 resolution = 2 filterSize = 1 flags = flagLogScale + flagUseSmoothing clear() print(zStart, zEnd, zInterval, zScale, zOffset, sampleRate, resolution, filterSize, flags) Vout = RasterToVectorContour(Rin, zInterval, zStart, zEnd, zScale, zOffset, sampleRate, resolution, filterSize, flags) # alternate form - use defaults # Vout = RasterToVectorContour(Rin, zInterval) CloseRaster(Rin)
Convert Raster to Vector lines.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RasterToVectorLine() GetInputRaster(RIn) GetOutputVector(VOut) thinFactor = 1 traceValue = 1 VOut = RasterToVectorLine(RIn, thinFactor, traceValue)
Converts TIN object to Raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# set up variables to use for method and flags methodLinear = 0 methodQuintic = 1 flagDefault = 0 flagCopyGeoref = 1 flagAutoscale = 2 # get the input and output objects GetInputTIN(Tin) GetOutputRaster(Rout) method = methodQuintic flags = flagCopyGeoref + flagAutoscale # to do both TINToRaster(Tin, Rout, method, flags) # other other optional function calls # to use default method and flags # TINToRaster(Tin, Rout) # to use default flags but set method # TINToRaster(Tin, Rout, method) CloseRaster(Rout)
Converts TIN object to vector object as contour lines
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# set up variables to hold flag values flagDefault = 0 flagLogScale = 1 GetInputTIN(Tin) GetOutputVector(Vout1) print("calling TinToVectorContour for Vout1") zInterval = 20 Vout1 = TINToVectorContour(Tin, zInterval) print("Done with Vout1") GetOutputVector(Vout2) print("calling TinToVectorContour for Vout2") zInterval = 40 Vout2 = TINToVectorContour(Tin, zInterval, flagDefault) print("Done with Vout1") GetOutputVector(Vout3) print("calling TinToVectorContour for Vout3") zInterval = 40 # set values that work for CB_ELEV/TIN_16 zStart = 1060 zEnd = 1360 zScale = 1 zOffset = 0 Vout3 = TINToVectorContour(Tin, zInterval, flagLogScale, zInterval, zStart, zEnd, zScale) print("Done with Vout3")
Convert Vector element to a raster
Where:
Parameters:
Details:
Returns:
Create Date: 29-Apr-1998
Modify Date: 10-Jun-1998
Available in SML for Windows: Yes
Example:
# example of VectorElementToRaster() GetInputVector(V); GetInputRaster(R); vGeo = GetLastUsedGeorefObject(V); rGeo = GetLastUsedGeorefObject(R); VectorElementToRaster(V, R, "polygon", 22, 0, vGeo, rGeo); VectorElementToRaster(V, R, "line", 10, 128, vGeo, rGeo); CloseRaster(R); CloseVector(V); print("done");
Create buffer zone Vector from selected Vector elements
of a given type, (or all elements of a given type).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of VectorToBufferZone() array elementList[1000] GetInputVector(VIn) GetOutputVector(VOut) numberLines = NumVectorLines(VIn) for i = 1 to numberLines / 2 { elementList[i] = i } VOut = VectorToBufferZone(VIn, "line", 50, "meters", "both", elementList, numberLines / 2)
Popup dialog to select an object and return info
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Prompt the user for an output object
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GetOutputObject()
Displays a popup window and displays the text associated with error_code
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() PopupError(-1012) # error codes are always negative
Open popup window with message and [OK] choice
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
PopupMessage("Hello!")
Open popup window asking for a number
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
PopupNum("Value?", 1, 10, 0, 2)
Popup dialog for user to select a table and field
Where:
Parameters:
Details:
Returns:
Create Date: 19-Oct-2000
Modify Date: none
Available in SML for Windows: No
Example:
database = OpenVectorPolyDatabase(vector); PopupSelectTableField(database, table$, field$);
Open popup window asking for a string
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() a$ = PopupString("Enter a string.", "Or use this default string.") print(a$)
Open popup window asking for a yes or no input
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
print(PopupYesNo("Continue?", 1))
Open popup window asking for a yes, no or cancel
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
print(PopupYesNoCancel("Continue?", 1))
Attach a database record to a CAD element
Where:
Parameters:
Details:
Returns:
Create Date: 16-May-2000
Modify Date: none
Available in SML for Windows: Yes
Create a new CAD block for element insertion
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# subblock.sml # demonstrates creating and inserting a subblock GetOutputCAD(C) # first create a box in block 1 CADWriteBox(C, 1, 0, 0, 100, 100, 0) # now create a subblock CADCreateBlock(C,"BLOCK2", "subblock") # create a small box in the subblock CADWriteBox(C, 2, 0, 0, 10, 10, 45) # now insert with replication - create a grid destblock = 1 sourceblock = 2 xinsert = 0 yinsert = 0 xScale = 1 yscale = 1 rotate = 0 numlines = 10 numcols = 10 linespace = 10 colspace = 10 CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert, xScale, yscale, rotate, numlines, numcols, linespace, colspace) CloseCAD(C)
Tests a CAD element against a region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CADElementInRegion() clear() # open existing file GetOutputCAD(C) GetInputRegion(Rgn) numberElements = CADNumElements(C, block) block = 1 for i = 1 to numberElements { elemtype$ = CADElementType(C, block, i) inRegion = CADElementInRegion(Rgn, C, block, i, "CompletelyInside") if (inRegion) print(elemtype$, "element ", i, "is CompletelyInside") inRegion = CADElementInRegion(Rgn, C, block, i, "PartlyInside") if (inRegion) print(elemtype$, "element ", i, "is PartLyInside") inRegion = CADElementInRegion(Rgn, C, block, i, "CompletelyOutside") if (inRegion) print(elemtype$, "element ", i, "is CompletelyOutside") inRegion = CADElementInRegion(Rgn, C, block, i, "PartlyOutside") if (inRegion) print(elemtype$, "element ", i, "is PartlyOutside") print("\n") } CloseCAD(C)
Returns type of CAD element.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of CADElementType() # read the number of blocks in a CAD object # and then loop through all the blocks and print out type of each element clear() GetInputCAD(C) numBlocks = CADNumBlocks(C) print("number of blocks: ", numBlocks) # loop through all blocks for blk = 1 to numBlocks { numElements = CADNumElements(C, blk) printf("block: %3d number of elements: %5d \n\n", blk, numElements) # loop through all elements for elem = 1 to numElements { # get the element type elem$ = CADElementType(C, blk, elem) printf("block: %3d element: %5d type: %s\n", blk, elem, elem$) } } CloseCAD(C)
Get list of all elements of a given type in a block
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# elemlist.sml # demonstrates how to get a list of elements of a specified # type in a block # define array to hold element list - will be resized to fit # array elemlist[10] clear() GetInputCAD(C) numElem = CADNumElements(C, 1) # get list of lines numLines = CADGetElementList( C, 1, "Line", elemlist ) printf("number of elements: %4d number of lines: %4d \n", numElem, numLines) print("Line list:\n") for elem = 1 to numLines { printf("%4d %4d\n", elem, elemlist[elem]) } CloseCAD(C)
Create a new CAD block for element insertion
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# subblock.sml # demonstrates creating and inserting a subblock GetOutputCAD(C) # first create a box in block 1 CADWriteBox(C, 1, 0, 0, 100, 100, 0) # now create a subblock CADCreateBlock(C,"BLOCK2", "subblock") # create a small box in the subblock CADWriteBox(C, 2, 0, 0, 10, 10, 45) # now insert with replication - create a grid destblock = 1 sourceblock = 2 xinsert = 0 yinsert = 0 xScale = 1 yscale = 1 rotate = 0 numlines = 10 numcols = 10 linespace = 10 colspace = 10 CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert, xScale, yscale, rotate, numlines, numcols, linespace, colspace) CloseCAD(C)
Returns number of blocks in a CAD object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# readelem.sml # demonstrate how to read the number of blocks in a CAD object # and then loop through all the blocks and print out type of # each element clear() GetInputCAD(C) numBlocks = CADNumBlocks(C) print("number of blocks: ", numBlocks) # loop through all blocks for blk = 1 to numBlocks { numElements = CADNumElements(C, blk) printf("block: %3d number of elements: %5d \n\n", blk, numElements) # loop through all elements for elem = 1 to numElements { # get the element type elem$ = CADElementType(C, blk, elem) printf("block: %3d element: %5d type: %s\n", blk, elem, elem$) } } CloseCAD(C)
Returns number of elements of all types in CAD object block
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# readelem.sml # demonstrate how to read the number of blocks in a CAD object # and then loop through all the blocks and print out type of # each element clear() GetInputCAD(C) numBlocks = CADNumBlocks(C) print("number of blocks: ", numBlocks) # loop through all blocks for blk = 1 to numBlocks { numElements = CADNumElements(C, blk) printf("block: %3d number of elements: %5d \n\n", blk, numElements) # loop through all elements for elem = 1 to numElements { # get the element type elem$ = CADElementType(C, blk, elem) printf("block: %3d element: %5d type: %s\n", blk, elem, elem$) } } CloseCAD(C)
Reads an arc
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# arc.sml # demonstrate creating and reading an arc CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an arc chord xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175 CADWriteArc(C, 1, xin, yin, rin, startAngle, endAngle) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadArc(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle) print("write and read CAD arc") print("element xCenter yCenter radius sAngle eAngle") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle) CloseCAD(C)
Reads an arc chord
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# arcchord.sml # demonstrate creating and reading an arc chord CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an arc xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175 CADWriteArcChord(C, 1, xin, yin, rin, startAngle, endAngle) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadArcChord(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle) print("write and read CAD arc chord") print("element xCenter yCenter radius sAngle eAngle") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle) CloseCAD(C)
Reads an arc wedge
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# arcwedge.sml # demonstrate creating and reading an arc wedge CAD element clear() #GetOutputCAD(C) create a new file or open existing file # write an arc wedge xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175 CADWriteArcWedge(C, 1, xin, yin, rin, startAngle, endAngle) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadArcWedge(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle) print("write and read CAD arc wedge") print("element xCenter yCenter radius sAngle eAngle") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle) CloseCAD(C)
Reads a polygon box
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# box.sml # demonstrate creating and reading a box CAD element # define array to hold element list array elemlist[10] clear() # create a new file or open existing file GetOutputCAD(C) llX = 2000 # define lower left x, y llY = 2000 urX = 2500 # define upper right x, y urY = 2050 for rotation = 0 to 180 step 20 { CADWriteBox(C, 1, llX, llY, urX, urY, rotation) } # now read out the box values numElem = CADNumElements(C, 1) numBoxes = CADGetElementList(C, 1, "Box", elemlist ) printf("number of elements: %4d number of boxes: %4d \n", numElem, numBoxes) print("box list:\n") for elem = 1 to numBoxes { CADReadBox(C, 1, elemlist[elem], llX, llY, urX, urY, rotation) printf("%4d %4d %6.2f %6.2f %6.2f %6.2f %6.2f\n", elem, elemlist[elem], llX, llY, urX, urY, rotation) } CloseCAD(C)
Reads a circle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# circle.sml # demonstrate creating and reading a circle CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write a circle xin = 100; yin = 200; rin = 50; CADWriteCircle(C, 1, xin, yin, rin) # the elements are always appended to end of block # so get number of elements - last element will be our circle lastelem = CADNumElements(C, 1) # now read circle data for most recently added element CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius) print("write and read CAD circle") print("element xCenter yCenter radius") printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius) CloseCAD(C)
Reads an ellipse
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# ellipse.sml # demonstrate creating and reading an ellipse CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an ellipse xin = 1000; yin = 2000; xSize = 500; ySize = 300; rotation = 45 CADWriteEllipse(C, 1, xin, yin, xSize, ySize, rotation) # the elements are always appended to end of block # so get number of elements - last element will be our ellipse lastelem = CADNumElements(C, 1) # now read ellipse data for most recently added element CADReadEllipse(C, 1, lastelem, xCenter, yCenter, xSize, ySize, rotation) print("write and read CAD ellipse") print("element xCenter yCenter xSize ySize rotation") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, rotation) CloseCAD(C)
Reads an elliptical arc
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# earc.sml # demonstrate creating and reading an elliptical arc CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write an elliptical arc xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30; endAngle = 150; rotation = 45 CADWriteEllipticalArc(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadEllipticalArc(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) print("write and read CAD elliptical arc") a$ = "element xCenter yCenter " b$ = "xSize ySize sAngle eAngle rotation" print(a$ + b$) printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) CloseCAD(C)
Reads an elliptical arc chord
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# echord.sml # demonstrate creating and reading an # elliptical arc chord CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write an elliptical arc chord xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30; endAngle = 150; rotation = 45 CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) print("write and read CAD elliptical arc chord") a$ = "element xCenter yCenter " b$ = "xSize ySize sAngle eAngle rotation" print(a$ + b$) printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) CloseCAD(C)
Reads an elliptical arc wedge.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# ewedge.sml # demonstrate creating and reading an # elliptical arc wedge CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write an elliptical arc wedge xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30; endAngle = 150; rotation = 45 CADWriteEllipticalArcWedge(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadEllipticalArcWedge(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) print("write and read CAD elliptical arc wedge") a$ = "element xCenter yCenter " b$ = "xSize ySize sAngle eAngle rotation" print(a$ + b$) printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) CloseCAD(C)
Reads a line
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# line.sml # demonstrate creating and reading a line CAD element # draws an amplitude modulated sine wave array xPoints[1000] array yPoints[1000] GetOutputCAD(C) numberPoints = 250 inc = .025 for i = 1 to numberPoints { x = i * inc xPoints[i] = x yPoints[i] = sin(x) * cos(10 * x) } CADWriteLine(C, 1, numberPoints, xPoints, yPoints) # now read and print out the points numberPoints = CADReadLine(C, 1, 1, xPoints, yPoints) print("line point list:\n") for elem = 1 to numberPoints { printf("%4d %6.2 %6.2f\n", elem, xPoints[elem], yPoints[elem]) } CloseCAD(C)
Reads a single point
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# point.sml # demonstrate creating and reading a point CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write a point xin = 100; yin = 200 CADWritePoint(C, 1, xin, yin) # the elements are always appended to end of block # so get number of elements - last element will be our point lastelem = CADNumElements(C, 1) # now read point data for most recently added element CADReadPoint(C, 1, lastelem, xCenter, yCenter) print("write and read CAD point") print("element xCenter yCenter") printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter) CloseCAD(C)
Reads a polygon
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# poly.sml # demonstrate creating and reading a polygon CAD element array xPoints[1000] array yPoints[1000] clear() GetOutputCAD(C) # define the polygon (triangle) xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 50 yPoints[3] = 100 numberPoints = 3 # polygon will automatically close to last point CADWritePoly(C, 1, numberPoints, xPoints, yPoints) # now read and print out the points numberPoints = CADReadPoly( C, 1, 1, xPoints, yPoints) print("polygon point list:\n") for elem = 1 to numberPoints { printf("%4d %6.2f %6.2f\n", elem, xPoints[elem], yPoints[elem]) } CloseCAD(C)
Reads a single line of text
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# text.sml # demonstrate creating and reading a text CAD element clear() format$ = "%7d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n" # create a new file or open existing file GetOutputCAD(C) # write some text baseX1 = 100 baseY1 = 100 baseX2 = 200 baseY2 = 100 height = 100 rotation = 0 xScale = 1.0 shear = 0 # since rotation = 0 we will use both basepoints text$ = "CAD text string 1" CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) # the elements are always appended to end of block # so get number of elements - last element will be our text lastelem = CADNumElements(C, 1) # now read data for most recently added element text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) print("write and read CAD text") print("element baseX1 baseY1 baseX2 baseY2 height", " rotation xScale shear") printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) print("Text: ", text$) # now use rotation and one base point baseX1 = 100 baseY1 = 500 baseX2 = 0 # don't care baseY2 = 0 # don't care height = 100 rotation = 45 xScale = 1.0 shear = -40 angle text backwards text$ = "CAD text string 2 - rotated and sheared" CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) lastelem = CADNumElements(C, 1) # now read data for most recently added element text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) print("Text: ", text$) CloseCAD(C)
Attach a database record to a CAD element
Where:
Parameters:
Details:
Returns:
Create Date: 16-May-2000
Modify Date: none
Available in SML for Windows: Yes
Creates an arc
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# arc.sml # demonstrates creating and reading an arc CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an arc xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175 CADWriteArc(C, 1, xin, yin, rin, startAngle, endAngle) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadArc(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle) print("write and read CAD arc") print("element xCenter yCenter radius sAngle eAngle") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle) CloseCAD(C)
Creates an arc chord
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# arcchord.sml # demonstrate creating and reading an arc chord CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an arc xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175 CADWriteArcChord(C, 1, xin, yin, rin, startAngle, endAngle) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadArcChord(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle) print("write and read CAD arc chord") print("element xCenter yCenter radius sAngle eAngle") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle) CloseCAD(C)
Creates an arc wedge
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# arcwedge.sml # demonstrate creating and reading an arc wedge CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an arc xin = 100; yin = 200; rin = 50; startAngle = 0; endAngle = 175 CADWriteArcWedge(C, 1, xin, yin, rin, startAngle, endAngle) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadArcWedge(C, 1, lastelem, xCenter, yCenter, radius, sAngle, eAngle) print("write and read CAD arc wedge") print("element xCenter yCenter radius sAngle eAngle") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius, sAngle, eAngle)
Creates a polygon from lower left and upper right corner points
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# box.sml # demonstrate creating and reading a box CAD element # define array to hold element list array elemlist[10] clear() # create a new file or open existing file GetOutputCAD(C) llX = 2000 # define lower left x, y llY = 2000 urX = 2500 # define upper right x, y urY = 2050 for rotation = 0 to 180 step 20 { CADWriteBox(C, 1, llX, llY, urX, urY, rotation) } # now read out the box values numElem = CADNumElements(C, 1) numBoxes = CADGetElementList(C, 1, "Box", elemlist ) printf("number of elements: %4d number of boxes: %4d \n", numElem, numBoxes) print("box list:\n") for elem = 1 to numBoxes { CADReadBox(C, 1, elemlist[elem], llX, llY, urX, urY, rotation) printf("%4d %4d %6.2f %6.2f %6.2f %6.2f %6.2f\n", elem, elemlist[elem], llX, llY, urX, urY, rotation) } CloseCAD(C)
Creates a circle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# circle.sml # demonstrate creating and reading a circle CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write a circle xin = 100; yin = 200; rin = 50; CADWriteCircle(C, 1, xin, yin, rin) # the elements are always appended to end of block # so get number of elements - last element will be our circle lastelem = CADNumElements(C, 1) # now read circle data for most recently added element CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius) print("write and read CAD circle") print("element xCenter yCenter radius") printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius) CloseCAD(C)
Creates an ellipse
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# ellipse.sml # demonstrate creating and reading an ellipse CAD element clear() GetOutputCAD(C) # create a new file or open existing file # write an ellipse xin = 1000; yin = 2000; xSize = 500; ySize = 300; rotation = 45 CADWriteEllipse(C, 1, xin, yin, xSize, ySize, rotation) # the elements are always appended to end of block # so get number of elements - last element will be our ellipse lastelem = CADNumElements(C, 1) # now read ellipse data for most recently added element CADReadEllipse(C, 1, lastelem, xCenter, yCenter, xSize, ySize, rotation) print("write and read CAD ellipse") print("element xCenter yCenter xSize ySize rotation") printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, rotation) CloseCAD(C)
Creates an elliptical arc
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# earc.sml # demonstrate creating and reading an elliptical arc CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write a elliptical arc xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30; endAngle = 150; rotation = 45 CADWriteEllipticalArc(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation) # the elements are always appended to end of block # so get number of elements - last element will be our ellipse lastelem = CADNumElements(C, 1) # now read ellipse data for most recently added element CADReadEllipticalArc(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) print("write and read CAD elliptical arc") a$ = "element xCenter yCenter " b$ = "xSize ySize sAngle eAngle rotation" print(a$ + b$) printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) CloseCAD(C)
Creates an elliptical arc chord
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# echord.sml # demonstrate creating and reading an # elliptical arc chord CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write an elliptical arc chord xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30; endAngle = 150; rotation = 45 CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation) # the elements are always appended to end of block # so get number of elements - last element will be our ellipse lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) print("write and read CAD elliptical arc chord") a$ = "element xCenter yCenter " b$ = "xSize ySize sAngle eAngle rotation" print(a$ + b$) printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) CloseCAD(C)
Creates an elliptical arc wedge
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# ewedge.sml # demonstrate creating and reading an # elliptical arc wedge CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write an elliptical arc wedge xin = 1000; yin = 2000; xSize = 500; ySize = 300; startAngle = 30; endAngle = 150; rotation = 45 CADWriteEllipticalArcWedge(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation) # the elements are always appended to end of block # so get number of elements - last element will be ours lastelem = CADNumElements(C, 1) # now read data for most recently added element CADReadEllipticalArcWedge(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) print("write and read CAD elliptical arc wedge") a$ = "element xCenter yCenter " b$ = "xSize ySize sAngle eAngle rotation" print(a$ + b$) printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n", lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation) CloseCAD(C)
Creates a line
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# line.sml # demonstrate creating and reading a line CAD element # draws an amplitude modulated sine wave array xPoints[1000] array yPoints[1000] GetOutputCAD(C) numberPoints = 250 inc = .025 for i = 1 to numberPoints { x = i * inc xPoints[i] = x yPoints[i] = sin(x) * cos(10 * x) } CADWriteLine(C, 1, numberPoints, xPoints, yPoints) # now print out the points numberPoints = CADReadLine(C, 1, 1, xPoints, yPoints) print("line point list:\n") for elem = 1 to numberPoints { printf("%4d %6.2 %6.2f\n", elem, xPoints[elem], yPoints[elem]) } CloseCAD(C)
Creates a single point
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# point.sml # demonstrate creating and reading a point CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write a point xin = 100; yin = 200 CADWritePoint(C, 1, xin, yin) # the elements are always appended to end of block # so get number of elements - last element will be our point lastelem = CADNumElements(C, 1) # now read point data for most recently added element CADReadPoint(C, 1, lastelem, xCenter, yCenter) print("write and read CAD point") print("element xCenter yCenter") printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter) CloseCAD(C)
Creates a polygon
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# poly.sml # demonstrate creating and reading a polygon CAD element array xPoints[1000] array yPoints[1000] clear() GetOutputCAD(C) # define the polygon (triangle) xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 50 yPoints[3] = 100 numberPoints = 3 # polygon will automatically close to last point CADWritePoly(C, 1, numberPoints, xPoints, yPoints) # now print out the points numberPoints = CADReadPoly(C, 1, 1, xPoints, yPoints) print("polygon point list:\n") for elem = 1 to numberPoints { printf("%4d %6.2f %6.2f\n", elem, Points[elem], yPoints[elem]) } CloseCAD(C)
Creates a single line of text
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# text.sml # demonstrate creating and reading a text CAD element clear() format$ = "%7d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n" # create a new file or open existing file GetOutputCAD(C) # write some text baseX1 = 100 baseY1 = 100 baseX2 = 200 baseY2 = 100 height = 100 rotation = 0 xScale = 1.0 shear = 0 # since rotation = 0 we will use both basepoints text$ = "CAD text string 1" CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) # the elements are always appended to end of block # so get number of elements - last element will be our text lastelem = CADNumElements(C, 1) # now read data for most recently added element text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) print("write and read CAD text") print("element baseX1 baseY1 baseX2 baseY2 height ", "rotation xScale shear") printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) print("Text: ", text$) # now use rotation and one base point baseX1 = 100 baseY1 = 500 baseX2 = 0 # don't care baseY2 = 0 # don't care height = 100 rotation = 45 xScale = 1.0 shear = -40 # angle text backwards text$ = "CAD text string 2 - rotated and sheared" CADWriteText(C, 1, text$, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) lastelem = CADNumElements(C, 1) # now read data for most recently added element text$ = CADReadText(C, 1, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) printf(format$, lastelem, baseX1, baseY1, baseX2, baseY2, height, rotation, xScale, shear) print("Text: ", text$) CloseCAD(C)
Closes a previously opened CAD object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputCAD(C) # or GetOutputCAD(C) # do something with CAD object C CloseCAD(C)
Create a CAD object
Where:
Parameters:
Details:
Returns:
Create Date: 16-May-2001
Modify Date: none
Available in SML for Windows: Yes
Use a File/Object selection dialog to select an input CAD
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# read elem.sml # demonstrates how to read the number of blocks in a CAD object # and loop through all the blocks and print out type of each # element clear() GetInputCAD(C) numBlocks = CADNumBlocks(C) print("number of blocks: ", numBlocks) # loop through all blocks for blk = 1 to numBlocks { numElements = CADNumElements(C, blk) printf("block: %3d number of elements: %5d \n\n", blk, numElements) # loop through all elements for elem = 1 to numElements { # get the element type elem$ = CADElementType(C, blk, elem) printf("block: %3d element: %5d type: %s\n", blk, elem, elem$) } } CloseCAD(C)
Opens a CAD object for reading or writing
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# circle.sml # demonstrate creating and reading a circle CAD element clear() # create a new file or open existing file GetOutputCAD(C) # write a circle xin = 100; yin = 200; rin = 50; CADWriteCircle(C, 1, xin, yin, rin) # the elements are always appended to end of block # so get number of elements - last element will be our circle lastelem = CADNumElements(C, 1) # now read cirle data for most recently added element CADReadCircle(C, 1, lastelem, xCenter, yCenter, radius) print("write and read CAD circle") print("element xCenter yCenter radius") printf("%7d %8.2f %8.2f %8.2f \n", lastelem, xCenter, yCenter, radius) CloseCAD(C)
Open a CAD object given a filename and objectname
Where:
Parameters:
Details:
Returns:
Create Date: 16-May-2001
Modify Date: none
Available in SML for Windows: Yes
Close an open TIN object
Parameters:
Returns:
Create Date: 05-Oct-2001
Modify Date: none
Available in SML for Windows: Yes
Use a File/Object selection dialog to select an input TIN
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputTIN(Tin) # get the RVC file name str$ = GetObjectFileName(Tin) objNum = GetObjectNumber(Tin) # and object number clear() print("TIN Object Number: ", objNum, "RVC file Name: ", str$)
Use a File/Object selection dialog to select an output TIN
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetOutputTIN(Tin) # get the RVC file name str$ = GetObjectFileName(Tin) objNum = GetObjectNumber(Tin) clear() print("TIN Object Number: ", objNum, "RVC file Name: ", str$)
Add a node to a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# addnode.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # note that node must be inside existing hull # use TINCreateFromNodes() to make initial TIN # get the extents - use georef version if needed GetObjectExtents(Tout, xMin, yMin, xMax, yMax) print("xMin, yMin, xMax, yMax ", xMin, yMin, xMax, yMax) x = floor((xMin + xMax) / 2) y = floor((yMin + yMax) / 2) z = 100 # set to what makes sense TINAddNode(Tout, x, y, z) print("node added at x, y ", x, y)
Create a new TIN object from a list of nodes
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# maketin.sml # declare arrays to hold node x, y, and z values array x[100], y[100], z[100] clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") zscale = 1 zoffset = 0 xytolerance = 1 # create some node values numnodes = 0 for yy = 0 to 4 { for xx = 0 to 4 { if ((xx % 2) == 0) { offset = 0 } else { offset = 10 } numnodes += 1 x[numnodes] = xx * 20 y[numnodes] = yy * 20 + offset z[numnodes] = yy * 5 + xx * 10 } } # create the tin TINCreateFromNodes(Tout, numnodes, x, y, z, zscale, zoffset, xytolerance)
Delete an edge from a TIN object and create a hole
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# edgehole.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick an edge less than or equal # to number of edges numedges = TINNumberEdges(Tout) edge = floor(numedges / 2) TINDeleteEdgeAndMakeHole(Tout, edge) print("edge deleted ", edge)
Delete a node from a TIN object without creating hole
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# delnode.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) TINDeleteNode(Tout, node) print("node deleted ", node)
Delete a node from a TIN object and create a hole
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# nodehole.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) TINDeleteNodeAndMakeHole(Tout, node)
Delete a triangle from a TIN object and create a hole
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# trihole.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a triangle less than or equal # to number of triangle numtriangles = TINNumberTriangles(Tout) triangle = floor(numtriangles / 2) TINDeleteTriangleAndMakeHole(Tout, triangle) print("triangle deleted ", triangle)
Delete TIN triangles inside a polygon
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of TINDeleteTrianglesInPolygon()
Tests a TIN element against a region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of TINElementInRegion() GetInputTIN(Tin1) GetInputRegion(Region1) # check triangle 1 inRegion = TINElementInRegion(Region1, Tin1, 1, "triangle", "CompletelyInside") if (inRegion) print( "element ", elem, "is CompletelyInside\n")
Returns list of all edges connected to a given node
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# edgelist.sml array edgelist[100] clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) numedges = TINGetConnectedEdgeList(Tout, node, edgelist) print("number of edges connected to node: ", node, " = ", numedges) for i = 1 to numedges { print(edgelist[i]) }
Returns list of all nodes connected to a given node
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# nodelist.sml array nodelist[100] clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) numnodes = TINGetConnectedNodeList(Tout, node, nodelist) print("number of nodes connected to node: ", node, " = ", numnodes) for i = 1 to numnodes { print(nodelist[i]) }
Return x and y extents of a edge
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# edgeext.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick an edge less than or equal # to number of edges numnedges = TINNumberEdges(Tout) edge = floor(numnedges / 2) TINGetEdgeExtents(Tout, edge, x1, y1, x2, y2) print("node, x1, y1, x2, y2 ", edge, x1, y1, x2, y2)
Returns nodes and left and right triangles for a given edge
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# nodetri.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick an edge less than or equal # to number of edges numedges = TINNumberEdges(Tout) edge = floor(numedges / 2) TINGetEdgeNodesAndTriangles(Tout, edge, nodefrom, nodeto, lefttriangle, righttriangle) temp$ = "edge, nodefrom, nodeto, lefttriangle, righttriangle " print(temp$, edge, nodefrom, nodeto, lefttriangle, righttriangle)
Return x and y coordinates of a node
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# nodeext.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) TINGetNodeExtents(Tout, node, xCoordinate, yCoordinate) print("node, x, y ", node, xCoordinate, yCoordinate)
Returns z value for a node
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# getz.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) zvalue = TINGetNodeZValue(Tout, node) print("node, zvalue ", node, zvalue)
Get the list of triangles surrounding a TIN node
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of TINGetSurroundTriangleList()
Return x and y extents of a triangle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# triext.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a triangle less than or equal # to number of triangle numtriangles = TINNumberTriangles(Tout) triangle = floor(numtriangles / 2) TINGetTriangleExtents(Tout, triangle, x1, y1, x2, y2) print("node, x1, y1, x2, y2 ", triangle, x1, y1, x2, y2)
Returns the nodes and edges that make up a given triangle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# nodeedge.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a triangle less than or equal # to number of triangles numtriangles = TINNumberTriangles(Tout) triangle = floor(numtriangles / 2) TINGetTriangleNodesAndEdges(Tout, triangle, node1, node2, node3, edge12, edge23, edge31) temp$ = "node, x1, y1triangle, node1, " temp$ = temp$ + "node2, node3, edge12, edge23, edge31 " print(temp$, triangle, node1, node2, node3, edge12, edge23, edge31)
Get a list of TIN triangles in a polygon
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of TINGetTrianglesInPolygon()
Returns number of edges in a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# tininfo.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") numhulls = TINNumberHulls(Tout) numedges = TINNumberEdges(Tout) numnodes = TINNumberNodes(Tout) numtri = TINNumberTriangles(Tout) temp$ = "num hulls, nodes, edges, triangles" print(temp$, numhulls, numnodes, numedges, numtri)
Returns number of hulls in a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# tininfo.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") numhulls = TINNumberHulls(Tout) numedges = TINNumberEdges(Tout) numnodes = TINNumberNodes(Tout) numtri = TINNumberTriangles(Tout) temp$ = "num hulls, nodes, edges, triangles" print(temp$, numhulls, numnodes, numedges, numtri)
Returns number of nodes in a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# tininfo.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") numhulls = TINNumberHulls(Tout) numedges = TINNumberEdges(Tout) numnodes = TINNumberNodes(Tout) numtri = TINNumberTriangles(Tout) temp$ = "num hulls, nodes, edges, triangles" print(temp$, numhulls, numnodes, numedges, numtri)
Returns number of triangles in a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# tininfo.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") numhulls = TINNumberHulls(Tout) numedges = TINNumberEdges(Tout) numnodes = TINNumberNodes(Tout) numtri = TINNumberTriangles(Tout) temp$ = "num hulls, nodes, edges, triangles" print(temp$, numhulls, numnodes, numedges, numtri)
Sets z value for a node
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# setz.sml clear() GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes") # pick a node less than or equal # to number of nodes numnodes = TINNumberNodes(Tout) node = floor(numnodes / 2) zvalue = TINGetNodeZValue(Tout, node) print("original node, value ", node, zvalue) TINSetNodeZValue(Tout, node, 100) zvalue = TINGetNodeZValue(Tout, node) print("new node, value ", node, zvalue)
Clear the specified region
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
ClearRegion(reg); #Clears the region
Copies a region and optionally changes its georeference.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of CopyRegion() fileName$ = "c:/tnt/win32/PntInRgn/regions.rvc" objectName$ = "Region1" objdesc$ = "created via CreateRegion()" OpenRegion(RegionIn, fileName$, objectName$) GetOutputRegion(RegionOut) # just copy the region RgnOutSame = CopyRegion(RegionIn) SaveRegion(RegionOut, fileName$, objectName$, objdesc$)
Create a Region without using a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of CreateRegion() fileName$ = "c:/tnt/win32/PntInRgn/regions.rvc" objectName$ = "Region1" objdesc$ = "created via CreateRegion()" CreateRegion(MyRgn, fileName$, objectName$, objdesc$);
Popup dialog to select a Region object for input
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetInputRegion()
Open a Region for output via dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of GetOutputRegion() fileName$ = "c:/tnt/win32/PntInRgn/regions.rvc" objectName$ = "Region1" objdesc$ = "created via CreateRegion()" OpenRegion(RegionIn, fileName$, objectName$) GetOutputRegion(RegionOut) # just copy the region RgnOutSame = CopyRegion(RegionIn) SaveRegion(RegionOut, fileName$, objectName$, objdesc$)
Opens a region without using a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of OpenRegion()
Test if a point is in a Region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of PointInRegion() GetInputRegion(RgnIn) x = 335000 y = 153000 # point and region same goeref result = PointInRegion(x, y, RgnIn) print(x, y, result) georeflatlon = GeorefAlloc() GeorefGetParms(georeflatlon) longitude = 42.64 latitude = -103.3 # west of P.M. is always negative # point and region different goeref result = PointInRegion(latitude, longitude, RgnIn, georeflatlon) printf("%3.4f %3.4f %2d", latitude, longitude, result) longitude = 42.63 latitude = -103.3 # west of P.M. is always negative # point and region different goeref result = PointInRegion(latitude, longitude, RgnIn, georeflatlon) printf("%3.4f %3.4f %2d", latitude, longitude, result) GeorefFree(georeflatlon)
Create a Region that is the intersection of two Regions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of RegionAND() GetInputRegion(Rgn1) GetInputRegion(Rgn2) GetOutputRegion(RgnAND) RgnAND = RegionAND(Rgn1, Rgn2)
Create a Region that is the union of two Regions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of RegionOR() GetInputRegion(Rgn1) GetInputRegion(Rgn2) GetOutputRegion(RgnOR) RgnOR = RegionOR(Rgn1, Rgn2)
Subtract a Region from a Region.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of RegionSubtract() GetInputRegion(Rgn1) GetInputRegion(Rgn2) GetOutputRegion(RgnSub) RgnSub = RegionSubtract(Rgn1, Rgn2)
Convert a region using a transparm.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RegionTrans()
Create a Region that is the exclusive or of two Regions.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of RegionXOR() GetInputRegion(Rgn1) GetInputRegion(Rgn2) GetOutputRegion(RgnXOR) RgnXOR = RegionXOR(Rgn1, Rgn2)
Saves a Region without using a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of SaveRegion() region RgnIn, RgnOut GetInputRegion(RgnIn) RgnOut = CopyRegion(RgnIn) SaveRegion(RgnOut, "c:/tnt/win32/pfarming/Save.rvc", "myregion", "created in SML");
Copy a file
Where:
Parameters:
Details:
Returns:
Create Date: 22-Jun-1998
Modify Date: 22-Jun-1998
Available in SML for Windows: Yes
Example:
# Example of CopyFile() class StatusHandle statusHandle; # create and destroy default status dialog result = CopyFile("c:/tnt/win32/data/Cb_elev.rvc", "c:/tnt/win32/data/Cb_elev_copy.rvc"); # don't display status - statusHandle is NULL result = CopyFile("c:/tnt/win32/data/Cb_elev.rvc", "c:/tnt/win32/data/Cb_elev_copy.rvc", statusHandle); print(result);
Create a directory
Where:
Parameters:
Details:
Returns:
Create Date: 06-Mar-2001
Modify Date: none
Available in SML for Windows: Yes
Create a temporary file name.
Where:
Details:
Returns:
Create Date: 08-Dec-2000
Modify Date: none
Available in SML for Windows: Yes
Delete a file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DeleteFile()
Close a file previously opened with fopen()
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# assume file already exists clear() f=fopen("c:/junk.txt", "r") # get next line of text from text file specified by fileNumber str$ = fgetline$(f) ; print(str$) fclose(f)
Detects end of file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() if (fexists("c:\temp.txt", "r")) then { handle = fopen("c:\temp.txt", "r") while (!feof(handle)){ line$ = fgetline$(handle) # do something with line } fclose(handle) }
Checks for existence and i/o mode of file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() if (fexists("c:\temp.txt", "r")) then print("c:\temp.txt exists")
Get next line of text from a text file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# assume file already exists clear() f=fopen("c:junk.txt", "r") # get next line of text from text file specified by fileNumber str$ = fgetline$(fileNumber) ; print(str$) fclose(f)
Get next number from text file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear();
Open text file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# assume file already exists clear(); f=fopen("c:junk.txt", "w+"); # create a file fprint(f, "This is line 1.\nThis is line 2."); # write to it fclose(f); # close it f=fopen("c:junk.txt", "r"); # open the file for reading print(fgetline$(f)); # read and print two lines fclose(f); # close it
Print unformated text or values to text file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear(); # assume file already exists # Open a file, then write to the file, then close it f=fopen("c:/junk.txt", "r+"); fprint(f, "This is line 1\nThis is line2.", "More line 2"); fclose(f); f=fopen("c:/junk.txt", "r"); print(fgetline$(f)); print(fgetline$(f)); fclose(f);
Print formatted text or values to text file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() str1$="This is line "; str2$=" you see. "; str3$="This is line 2. "; number=1; # Create a file, then write to the file, then close it f=fopen("c:/junk.txt", "w+"); fprintf(f, "%s%d%sn%s", str1$, number, str2$, str3$); fclose(f); f=fopen("c:/junk.txt", "r"); print(fgetline$(f)); print(fgetline$(f)); fclose(f);
Read raw bytes a from a file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of fread()
Read a byte from a file or port.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of freadbyte()
Read a string from a file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of freadstring()
Write unformated data to a file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of fwrite()
Write a byte to a file or port.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of fwritebyte()
Write a string to a file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of fwritestring()
Popup a dialog for selecting a directory
Where:
Parameters:
Details:
Returns:
Create Date: 11-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GetDirectory()
Popup dialog to select a file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetInputFileName()
Open or create a text file for input/output via dialog
Where:
Parameters:
Details:
Returns:
Create Date: 06-Aug-1998
Modify Date: 01-Feb-2001
Available in SML for Windows: Yes
Example:
# Example of GetInputTextFile() class FILE fIn; clear() fIn = GetInputTextFile("c:/default.txt", "Select text file for input", "txt"); # read a line from the text file str$ = fgetline$(fIn) print(str$);
Popup dialog to select an output file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GetOutputFileName()
Open a text file for output via dialog
Where:
Parameters:
Details:
Returns:
Create Date: 06-Aug-1998
Modify Date: 01-Feb-2001
Available in SML for Windows: Yes
Example:
# Example of GetOutputTextFile() class FILE fOut; clear() fOut = GetOutputTextFile("c:/default.txt", "Select text file for input", "txt"); # write some lines to the text file fwritestring(fOut, "string1\n"); fwritestring(fOut, "string2\n");
Used to register functions to call when data is available.
Procedure will be passed two parameters, the port, and the value passed as the
data parameter to PortAddCallback()
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of PortAddCallback()
Close a port.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of PortClose()
Open a port.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of PortOpen()
Rename a file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of RenameFile()
Read a text file from a text subobject under the script or a file in the same directory
Where:
Parameters:
Details:
Returns:
Create Date: 20-Nov-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ScriptResourceReadFull()
Read an entire text file into a string (keep the size "reasonable)\"
Where:
Parameters:
Details:
Returns:
Create Date: 01-Feb-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TextFileReadFull()
Close an ini file
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of IniClose()
Open an ini file
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of IniOpenFile()
Open an RVC text object
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of IniOpenObject()
Open an INI file as a subobject of the script or file in same directory
Where:
Parameters:
Details:
Returns:
Create Date: 07-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of IniOpenScriptResource()
Read a number from an ini file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of IniReadNumber()
Read a string from an ini file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of IniReadString()
Write a number to an ini file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of IniWriteNumber()
Write a string to an ini file
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of IniWriteString()
Add frame to movie
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Finalize movie handle
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Get File Extension
Where:
Parameters:
Details:
Returns:
Create Date: 05-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Initialize movie handle (returns handle)
Where:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
set movie format
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
set movie frame height
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
set movie frame rate
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
set movie frame width
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Start movie
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Stop movie
Where:
Parameters:
Details:
Returns:
Create Date: 02-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Export a CAD using class derived from MieCAD class
Where:
Parameters:
Details:
Returns:
Create Date: 16-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ExportCAD() class MieMIFCAD mifHandle; mifFile$ = "c:/SML_ExpCAD.mif"; inputRVCFile$ = "c:/ImpExp.rvc"; inputObjectName$ = "FOOTPRNT"; mifHandle.TableType = "CAD"; ExportCAD(mifHandle, mifFile$, inputRVCFile$, inputObjectName$);
Export a database
Where:
Parameters:
Details:
Returns:
Create Date: 08-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ExportDatabase()
Export a Raster using class derived from MieRASTER class
Where:
Parameters:
Details:
Returns:
Create Date: 16-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ExportRaster() class MieTIFF tiffHandle; tiffFile$ = "c:/import/smlexp.tif"; inputRVCFile$ = "c:/import/temp_imp.rvc"; inputObjectName$ = "imptiff"; # set optional parms tiffHandle.CompressionType = "NONE"; tiffHandle.PlanarConfiguration = "Band sequential"; ExportRaster(tiffHandle, tiffFile$, inputRVCFile$, inputObjectName$);
Export a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 16-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ExportTIN()
Export a Vector using class derived from MieVECTOR class
Where:
Parameters:
Details:
Returns:
Create Date: 16-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ExportVector() class MieGRASSVECTOR vHandle; grassFile$ = "c:/SML_Exp.ddf"; inputRVCFile$ = "c:/test.rvc"; inputObjectName$ = "VECTORS"; ExportVector(vHandle, grassFile$, inputRVCFile$, inputObjectName$);
Import a CAD using class derived from MieCAD class
Where:
Parameters:
Details:
Returns:
Create Date: 17-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ImportCAD() class MieMIF mifHandle; mifFile$ = "c:/contours.mif"; destRVCFile$ = "c:/ImpExp.rvc"; destObjectName$ = "impMIF"; destObjectDesc$ = "imported via SML"; mifHandle.TableType = "CAD" ImportCAD(mifHandle, mifFile$, destRVCFile$, destObjectName$, destObjectDesc$);
Import a Raster using class derived from MieRASTER class
Where:
Parameters:
Details:
Returns:
Create Date: 16-Feb-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ImportRaster() class MieTIFF tiffHandle; tiffFile$ = "c:/import/m_ulu_tm.tif"; rvcFile$ = "c:/import/temp_imp.rvc"; objectName$ = "imptiff"; objectDesc$ = "imported via SML"; # set any optional parms tiffHandle.SwapRedBlue = 1; ImportRaster(tiffHandle, tiffFile$, rvcFile$, objectName$, objectDesc$);
Import a TIN object
Where:
Parameters:
Details:
Returns:
Create Date: 17-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ImportTIN()
Import a Vector using class derived from MieVECTOR class
Where:
Parameters:
Details:
Returns:
Create Date: 16-Mar-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ImportVector() class MieMIFVector vHandle; mifFile$ = "c:/contours.mif"; destRVCFile$ = "c:/test.rvc"; destObjectName$ = "ImpVectMIFF"; destObjectDesc$ = "imported via SML"; # set vector parms vHandle.TableType = "Polygon"; vHandle.ElementType = "Polygon"; ImportVector(vHandle, mifFile$, destRVCFile$, destObjectName$, destObjectDesc$);
Morphological compliment
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of MorphCompliment()
Morphological copy
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of MorphCopy()
Morphological difference
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of MorphDifference()
Enlarges shapes by expanding their boundaries, opposite of MorphErosion()
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
The morphology functions are not fully implemented in this version of SML. This information is for future reference only.
Shrinks shapes by expanding their boundaries, opposite of MorphDilation()
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
The morphology functions are not fully implemented in this version of SML. This information is for future reference only.
Morphological intersection
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of MorphIntersection()
Morphological test
Where:
Parameters:
Details:
Returns:
Create Date: 21-Apr-1995
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of MorphTest()
filter raster with focal area - (alternate form) FocalFilter(Rvar, Rfilt [, clin, ccol])
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = NumLins(Rvar) ; columns = NumCols(Rvar) type$ = RastType(Rvar) GetOutputRaster(R1, lines, columns, type$) GetOutputRaster(R2, lines, columns, type$) array f[3,3] # all values are 0 f[2,2] = 1 # an identity filter CreateTempRaster(Rfilt, lines, columns, type$) Rfilt[2,2]=1 # identity filter R1=FocalFilter(Rvar, f, 3, 3) R2=FocalFilter(Rvar, Rfilt) # R1 and R2 are both identical to Rvar,having been filtered by # 0 0 0 # 0 1 0 # 0 0 0 # with the filter focus at its center. By moving the 1 # to any other place in the kernel, you can shift the # raster 1 pixel in the opposite direction CloseRaster(Rvar) ; CloseRaster(R1) ; CloseRaster(R2)
Most frequently occurring value in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find majority when including every element in Rast # that is in the focal area, assuming that the center # of the focal area will be used as the focus of Rvar. fm1 = FocalMajority(Rvar, lines, columns, ctrlin, ctrcol) # find majority when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalMajority(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Largest value in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find maximum when including every element in Rast # that is in the focal area, assuming that the center # of the focal area will be used as the focus of Rvar. fm1 = FocalMax(Rvar, lines, columns, ctrlin, ctrcol) # find maximum when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalMax(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2)
Average of cell values in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find average when including every element in Rast # that is in the focal area, assuming that the center of the focal # area will be used as the focus of Rvar. fm1 = FocalMean(Rvar, lines, columns, ctrlin, ctrcol) # find average when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalMean(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2)
Median - (middle element of sorted list) of values in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find median when including every element in Rast that # is in the focal area, assuming that the center of the # focal area will be used as the focus of Rvar. fm1 = FocalMedian(Rvar, lines, columns, ctrlin, ctrcol) # find median when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalMedian(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Smallest value in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find minimum when including every element in Rast # that is in the focal area, assuming that the center # of the focal area will be used as the focus of Rvar. fm1 = FocalMin(Rvar, lines, columns, ctrlin, ctrcol) # find minimum when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalMin(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Least frequently occurring cell value in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find minority when including every element in Rast # that is in the focal area, assuming that the center # of the focal area will be used as the focus of Rvar. fm1 = FocalMinority(Rvar, lines, columns, ctrlin, ctrcol) # find minority when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalMinority(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Standard deviation of values in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find Standard Deviation when including every element in Rast # that is in the focal area, assuming that the center # of the # focal area will be used as the focus of Rvar. fm1 = FocalSD(Rvar, lines, columns, ctrlin, ctrcol) # find Standard Deviation when including the first, # third, fifth, etc., elements in each row of Rvar that # are also in the focal area. fm2 = FocalSD(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Slope of elevation surface at focus of focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) ctrlin = 100 ; ctrcol = 100 # find slope when including every element in Raster that # is in the focal area, assuming that the center of the # focal area will be used as the focus of Rvar. slope = FocalSlope(Rvar, ctrlin, ctrcol)
Sum of values in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find SUM when including every element in Rast that is # in the focal area, assuming that the center of the # focal area will be used as the focus of Rvar. fm1 = FocalSum(Rvar, lines, columns, ctrlin, ctrcol) # find SUM when including the first, third, fifth, etc. # elements in each row of Rvar that are also in the focal area. fm2 = FocalSum(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Statistical variance of cell values in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find variance when including every element in Rast # that is in the focal area, assuming that the center # of the focal area will be used as the focus of Rvar. fm1 = FocalVariance(Rvar, lines, columns, ctrlin, ctrcol) # find variance when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalVariance(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Number of different cell values in focal area
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) lines = 5 ; columns = 7 ; ctrlin = 100 ; ctrcol = 100 # find variety when including every element in Rast # that is in the focal area, assuming that the center # of the focal area will be used as the focus of Rvar. fm1 = FocalVariety(Rvar, lines, columns, ctrlin, ctrcol) # find variety when including the first, third, fifth, # etc. elements in each row of Rvar that are also in # the focal area. fm2 = FocalVariety(Rvar, lines, columns, ctrlin, ctrcol, 2) print(fm1, fm2) CloseRaster(Rvar)
Largest value in raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) gmax=GlobalMax(R) ; print(gmax) CloseRaster(R)
Average of cell values in raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) gmax=GlobalMean(R) ; print(gmax) CloseRaster(R)
Smallest value in entire raster
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) gmax=GlobalMin(R) ; print(gmax) CloseRaster(R)
Standard deviation of values in raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) gmax=GlobalSD(R) ; print(gmax) CloseRaster(R)
Sum of values in raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) gmax=GlobalSum(R) ; print(gmax) CloseRaster(R)
Statistical variance of cell values in raster object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(R) gmax=GlobalVariance(R) ; print(gmax) CloseRaster(R)
Find the closest point on a line to a given point.
Where:
Parameters:
Details:
Returns:
Create Date: 07-Jul-1999
Modify Date: none
Available in SML for Windows: Yes
Add a label to a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array labelList[10] clear() GetOutputVector(V, "VectorToolkit") label$ = "abcdEFG" height = 20 x1 = 20 y1 = 10 x2 = 40 y2 = 10 numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) # add 4 labels for i = 1 to 4 { VectorAddLabel(V, label$, height, x1, y1, x2, y2) y1 += 25 y2 += 25 height /= 2 } numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) VectorDeleteLabel(V, 1) numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) labelList[1] = 1 labelList[2] = 2 VectorDeleteLabels(V, labelList, 2) numLabels = NumVectorLabels(V) print("number of labels: ", numLabels)
Adds a multiple vertex line to a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], lineList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points for our line xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 50 yPoints[2] = 45 xPoints[3] = 75 yPoints[3] = 80 xPoints[4] = 100 yPoints[4] = 100 # add 4 lines - each with four points for i = 1 to 4 { VectorAddLine(V, 4, xPoints, yPoints) # change the points to make a different line for j = 1 to 4 { xPoints[j] = xPoints[j] + 200 yPoints[j] = yPoints[j] + 20 } } numLines = NumVectorLines(V) print("number of Lines: ", numLines) VectorDeleteLine(V, 1) numLines = NumVectorLines(V) print("number of Lines: ", numLines) lineList[1] = 1 lineList[2] = 2 VectorDeleteLines(V, lineList, 2) numLines = NumVectorLines(V) print("number of Lines: ", numLines)
Adds a node to a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], nodeList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points for our polygon box xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 70 yPoints[2] = 70 xPoints[3] = 90 yPoints[3] = 100 xPoints[4] = 130 yPoints[4] = 120 # create a line numberPoints = 4 VectorAddLine(V, numberPoints, xPoints, yPoints) # create a second line numberPoints = 4 for i = 1 to 5 { xPoints[i] = xPoints[i] + 200 } VectorAddLine(V, numberPoints, xPoints, yPoints) # now add a some nodes to the first line x = 10 y = 10 searchDistance = 10 for i = 1 to 4 { VectorAddNode(V, x, y, searchDistance) print("node added at x, y: ", x, y) x = x + 10 y = y + 10 } # now add a some nodes to the second line x = 210 y = 10 searchDistance = 10 for i = 1 to 4 { VectorAddNode(V, x, y, searchDistance) print("node added at x, y: ", x, y) x = x + 10 y = y + 10 } # now delete a single node from the first line node1 = FindClosestNode(V, 10, 10) VectorDeleteNode(V, node1) print("node", node1, "at x, y", 10, 10, "will be deleted") # now delete multiple nodes from the first line x = 20 y = 20 searchDistance = 10 for i = 1 to 3 { nodeList[i] = FindClosestNode(V, x, y) print("node", nodeList[i], "at x, y", x, y, "will be deleted") x = x + 10 y = y + 10 } numNodes = 3 VectorDeleteNodes(V, nodeList, numNodes)
Adds a point to a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], pointList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 # add 4 points for i = 1 to 4 { VectorAddPoint(V, xPoints[i], yPoints[i]) } numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) VectorDeletePoint(V, 1) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) pointList[1] = 1 pointList[2] = 2 VectorDeletePoints(V, pointList, 2) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints)
Adds a line with only two vertices to a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetOutputVector(V, "VectorToolkit") numLines = NumVectorLines(V) print("number of lines: ", numLines) # add two lines VectorAddTwoPointLine(V, 0, 0, 25, 25) VectorAddTwoPointLine(V, 50, 5, 100, 90) numLines = NumVectorLines(V) print("number of lines: ", numLines)
Changes the vertices of an existing line in a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10] clear() # set up new points for line change xPoints[1] = 10 yPoints[1] = 10 xPoints[2] = 40 yPoints[2] = 30 xPoints[3] = 70 yPoints[3] = 90 xPoints[4] = 125 yPoints[4] = 115 numberPoints = 4 GetOutputVector(V, "VectorToolkit") # add a line VectorAddLine(V, numberPoints, xPoints, yPoints) # now change a middle point xPoints[2] = 50 yPoints[2] = 45 lineNum = 1 VectorChangeLine(V, lineNum, numberPoints, xPoints, yPoints)
Changes the location of an existing point in a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10] clear() GetOutputVector(V, "VectorToolkit") numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) # add some points VectorAddPoint(V, 10, 10) VectorAddPoint(V, 35, 35) VectorAddPoint(V, 50, 50) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) # now change the second point pointNum = 2 VectorChangePoint(V, pointNum, 25, 25)
Delete dangling lines.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of VectorDeleteDangleLines()
Deletes a label from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array labelList[10] clear() GetOutputVector(V, "VectorToolkit") label$ = "abcdEFG" height = 20 x1 = 20 y1 = 10 x2 = 40 y2 = 10 numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) # add 4 labels for i = 1 to 4 { VectorAddLabel(V, label$, height, x1, y1, x2, y2) y1 += 25 y2 += 25 height /= 2 } numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) VectorDeleteLabel(V, 1) numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) labelList[1] = 1 labelList[2] = 2 VectorDeleteLabels(V, labelList, 2) numLabels = NumVectorLabels(V) print("number of labels: ", numLabels)
Deletes multiple labels from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array labelList[10] clear() GetOutputVector(V, "VectorToolkit") label$ = "abcdEFG" height = 20 x1 = 20 y1 = 10 x2 = 40 y2 = 10 numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) # add 4 labels for i = 1 to 4 { VectorAddLabel(V, label$, height, x1, y1, x2, y2) y1 += 25 y2 += 25 height /= 2 } numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) VectorDeleteLabel(V, 1) numLabels = NumVectorLabels(V) print("number of labels: ", numLabels) labelList[1] = 1 labelList[2] = 2 VectorDeleteLabels(V, labelList, 2) numLabels = NumVectorLabels(V) print("number of labels: ", numLabels)
Deletes a line from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], lineList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points for our line xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 50 yPoints[2] = 45 xPoints[3] = 75 yPoints[3] = 80 xPoints[4] = 100 yPoints[4] = 100 # add 4 lines - each with four points for i = 1 to 4 { VectorAddLine(V, 4, xPoints, yPoints) # change the points to make a different line for j = 1 to 4 { xPoints[j] = xPoints[j] + 200 yPoints[j] = yPoints[j] + 20 } } numLines = NumVectorLines(V) print("number of Lines: ", numLines) VectorDeleteLine(V, 1) numLines = NumVectorLines(V) print("number of Lines: ", numLines) lineList[1] = 1 lineList[2] = 2 VectorDeleteLines(V, lineList, 2) numLines = NumVectorLines(V) print("number of Lines: ", numLines)
Deletes mutiple lines from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], lineList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points for our line xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 50 yPoints[2] = 45 xPoints[3] = 75 yPoints[3] = 80 xPoints[4] = 100 yPoints[4] = 100 # add 4 lines - each with four points for i = 1 to 4 { VectorAddLine(V, 4, xPoints, yPoints) # change the points to make a different line for j = 1 to 4 { xPoints[j] = xPoints[j] + 200 yPoints[j] = yPoints[j] + 20 } } numLines = NumVectorLines(V) print("number of Lines: ", numLines) VectorDeleteLine(V, 1) numLines = NumVectorLines(V) print("number of Lines: ", numLines) lineList[1] = 1 lineList[2] = 2 VectorDeleteLines(V, lineList, 2) numLines = NumVectorLines(V) print("number of Lines: ", numLines)
Deletes a node from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], nodeList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points for our polygon box xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 70 yPoints[2] = 70 xPoints[3] = 90 yPoints[3] = 100 xPoints[4] = 130 yPoints[4] = 120 # create a line numberPoints = 4 VectorAddLine(V, numberPoints, xPoints, yPoints) # create a second line numberPoints = 4 for i = 1 to 5 { xPoints[i] = xPoints[i] + 200 } VectorAddLine(V, numberPoints, xPoints, yPoints) # now add a some nodes to the first line x = 10 y = 10 searchDistance = 10 for i = 1 to 4 { VectorAddNode(V, x, y, searchDistance) print("node added at x, y: ", x, y) x = x + 10 y = y + 10 } # now add a some nodes to the second line x = 210 y = 10 searchDistance = 10 for i = 1 to 4 { VectorAddNode(V, x, y, searchDistance) print("node added at x, y: ", x, y) x = x + 10 y = y + 10 } # now delete a single node from the first line node1 = FindClosestNode(V, 10, 10) VectorDeleteNode(V, node1) print("node", node1, "at x, y", 10, 10, "will be deleted") # now delete multiple nodes from the first line x = 20 y = 20 searchDistance = 10 for i = 1 to 3 { nodeList[i] = FindClosestNode(V, x, y) print("node", nodeList[i], "at x, y", x, y, "will be deleted") x = x + 10 y = y + 10 } numNodes = 3 VectorDeleteNodes(V, nodeList, numNodes)
Deletes multiple nodes from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], nodeList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points for our polygon box xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 70 yPoints[2] = 70 xPoints[3] = 90 yPoints[3] = 100 xPoints[4] = 130 yPoints[4] = 120 # create a line numberPoints = 4 VectorAddLine(V, numberPoints, xPoints, yPoints) # create a second line numberPoints = 4 for i = 1 to 5 { xPoints[i] = xPoints[i] + 200 } VectorAddLine(V, numberPoints, xPoints, yPoints) # now add a some nodes to the first line x = 10 y = 10 searchDistance = 10 for i = 1 to 4 { VectorAddNode(V, x, y, searchDistance) print("node added at x, y: ", x, y) x = x + 10 y = y + 10 } # now add a some nodes to the second line x = 210 y = 10 searchDistance = 10 for i = 1 to 4 { VectorAddNode(V, x, y, searchDistance) print("node added at x, y: ", x, y) x = x + 10 y = y + 10 } # now delete a single node from the first line node1 = FindClosestNode(V, 10, 10) VectorDeleteNode(V, node1) print("node", node1, "at x, y", 10, 10, "will be deleted") # now delete multiple nodes from the first line x = 20 y = 20 searchDistance = 10 for i = 1 to 3 { nodeList[i] = FindClosestNode(V, x, y) print("node", nodeList[i], "at x, y", x, y, "will be deleted") x = x + 10 y = y + 10 } numNodes = 3 VectorDeleteNodes(V, nodeList, numNodes)
Deletes a point from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], pointList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 # add 4 points for i = 1 to 4 { VectorAddPoint(V, xPoints[i], yPoints[i]) } numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) VectorDeletePoint(V, 1) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) pointList[1] = 1 pointList[2] = 2 VectorDeletePoints(V, pointList, 2) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints)
Deletes multiple points from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], pointList[10] clear() GetOutputVector(V, "VectorToolkit") #initialize some points xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 # add 4 points for i = 1 to 4 { VectorAddPoint(V, xPoints[i], yPoints[i]) } numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) VectorDeletePoint(V, 1) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints) pointList[1] = 1 pointList[2] = 2 VectorDeletePoints(V, pointList, 2) numberPoints = NumVectorPoints(V) print("number of points: ", numberPoints)
Deletes a polygon from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], polyList[10] clear() GetOutputVector(V, "VectorToolkit") # draw some boxes - this will create polygons # all closed lines are converted to polygons xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 xPoints[5] = 0 yPoints[5] = 0 for i = 0 to 5 { VectorAddLine(V, 5, xPoints, yPoints) for j = 1 to 5 { xPoints[j] = xPoints[j] + 150 } } numPolys = NumVectorPolys(V) print("number of polygons: ", numPolys) # now delete one polygon polyNum = 1 VectorDeletePoly(V, polyNum) numPolys = NumVectorPolys(V) print("number of polygons: ", numPolys) # now delete multiple polygons polyList[1] = 1 polyList[2] = 3 polyCount = 2 VectorDeletePolys(V, polyList, polyCount) numPolys = NumVectorPolys(V) print("number of polygons: ", numPolys)
Deletes multiple polygons from a vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10], polyList[10] clear() GetOutputVector(V, "VectorToolkit") # draw some boxes - this will create polygons # all closed lines are converted to polygons xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 xPoints[5] = 0 yPoints[5] = 0 for i = 0 to 5 { VectorAddLine(V, 5, xPoints, yPoints) for j = 1 to 5 { xPoints[j] = xPoints[j] + 150 } } numPolys = NumVectorPolys(V) print("number of polygons: ", numPolys) # now delete one polygon polyNum = 1 VectorDeletePoly(V, polyNum) numPolys = NumVectorPolys(V) print("number of polygons: ", numPolys) # now delete multiple polygons polyList[1] = 1 polyList[2] = 3 polyCount = 2 VectorDeletePolys(V, polyList, polyCount) numPolys = NumVectorPolys(V) print("number of polygons: ", numPolys)
Delete standard attribute of a Vector object.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of VectorDeleteStdAttributes()
Find intersection of a ray and a Vector line.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of VectorLineRayIntersection()
Sets optional flags for a given vector object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10] clear() GetOutputVector(V, "VectorToolkit") # not going to use labels so tell it not to create qtree VectorSetFlags(V, "NoLabelQTree") # draw some boxes - this will create polygons # all closed lines are converted to polygons xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 xPoints[5] = 0 yPoints[5] = 0 VectorAddLine(V, 5, xPoints, yPoints) # now add some points for i = 1 to 4 { VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150) } numPolys = NumVectorPolys(V) numberPoints = NumVectorPoints(V) print("number of polygons, points: ", numPolys, numberPoints)
Sets Z value for Vector element.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# example of VectorSetZValue() # 3D Vector creation and manipulation clear(); # alternative - CreateVector() instead of GetOutputVector() # CreateVector(V, "c:/tnt/win32/projects/V3D/V3D.rvc", "V3d", # "3-d Vector from SML", "VectorToolkit,3DVector"); GetOutputVector(V, "VectorToolkit,Network,3DVector"); # add three points VectorAddPoint(V, 0, 0); VectorAddPoint(V, 25, 25); VectorAddPoint(V, 50, 50); # set z value for second point VectorSetZValue(V, "point", 2, 100); # add three lines VectorAddTwoPointLine(V, 100, 100, 150, 150, 50, 100); VectorAddTwoPointLine(V, 200, 200, 250, 250, 100, 150); VectorAddTwoPointLine(V, 300, 300, 350, 350, 150, 200); # set z value for second point # VectorSetZValue(V, "line", 2, 200); numLines = NumVectorLines(V); print("number of lines: ", numLines);
Force update of standard attributes.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of VectorUpdateStdAttributes()
Validate vector topology
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
array xPoints[10], yPoints[10] clear() GetOutputVector(V, "VectorToolkit") # draw some boxes - this will create polygons # all closed lines are converted to polygons xPoints[1] = 0 yPoints[1] = 0 xPoints[2] = 100 yPoints[2] = 0 xPoints[3] = 100 yPoints[3] = 100 xPoints[4] = 0 yPoints[4] = 100 xPoints[5] = 0 yPoints[5] = 0 VectorAddLine(V, 5, xPoints, yPoints) # now add some points for i = 1 to 4 { VectorAddPoint(V, xPoints[i] + 150, yPoints[i] + 150) } numPolys = NumVectorPolys(V) numberPoints = NumVectorPoints(V) print("number of polygons, points: ", numPolys, numberPoints) print("validating vector") VectorValidate(V, "NoRemoveExNodes") print("done")
Adaptive resonance (neural net) classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyAdaptiveResonance() GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numberClasses = 15; maxIterations = 10; initialMinDistance = 10; RasterClassifyAdaptiveResonance(numberClasses, maxIterations, initialMinDistance, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
Adaptive resonance (neural net) classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyAdaptiveResonanceWithMask() GetInputRaster(Mask); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numberClasses = 15; maxIterations = 10; initialMinDistance = 10; RasterClassifyAdaptiveResonanceWithMask(numberClasses, maxIterations, initialMinDistance, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
Fuzzy C means classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyFuzzyCMean() GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; distanceON$ = "distras"; distanceDesc$ = "created in SML"; numClasses = 15; maxIterations = 10; RasterClassifyFuzzyCMean(numClasses, maxIterations, classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", R1, R2, R3);
Fuzzy C means classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyFuzzyCMeanWithMask() GetInputRaster(Mask); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; distanceON$ = "distras"; distanceDesc$ = "created in SML"; numClasses = 15; maxIterations = 10; RasterClassifyFuzzyCMeanWithMask(numClasses, maxIterations, classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, R1, R2, R3);
ISODATA classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyISODATA() GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "ISODist"; distDesc$ = "created in SML"; numberClasses = 15; numberIterations = 10; maxStdDeviaton = 15; minDistanceToCombine = 3.2 minClusterCells = 30 minDistanceForChaining = 3.2 RasterClassifyISODATA(numberClasses, numberIterations, maxStdDeviaton, minDistanceToCombine, minClusterCells, minDistanceForChaining, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
ISODATA classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyISODATAWithMask() GetInputRaster(Mask); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "ISODist"; distDesc$ = "created in SML"; numberClasses = 15; numberIterations = 10; maxStdDeviaton = 15; minDistanceToCombine = 3.2 minClusterCells = 30 minDistanceForChaining = 3.2 RasterClassifyISODATAWithMask(numberClasses, numberIterations, maxStdDeviaton, minDistanceToCombine, minClusterCells, minDistanceForChaining, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
K means classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyKMeans() GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numClasses = 15; maxIterations = 10; initClusterMinDist = 10; maxMoveSteady = 5; minSteadyClusterPercent = 80; RasterClassifyKMeans(numClasses, maxIterations, initClusterMinDist, maxMoveSteady, minSteadyClusterPercent, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
K means classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyKMeansWithMask() GetInputRaster(Mask); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "distras"; distDesc$ = "created in SML"; numClasses = 15; maxIterations = 10; initClusterMinDist = 10; maxMoveSteady = 5; minSteadyClusterPercent = 80; RasterClassifyKMeansWithMask(numClasses, maxIterations, initClusterMinDist, maxMoveSteady, minSteadyClusterPercent, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
Maximum likelihood classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyMaxLikelihood() GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = ""; # this function does not create a distance raster distanceON$ = ""; distanceDesc$ = ""; minLikelihoodPercent = 80; RasterClassifyMaxLikelihood(minLikelihoodPercent, classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Training, R1, R2, R3);
Maximum likelihood classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyMaxLikelihoodWithMask() GetInputRaster(Mask); GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = ""; # this function does not create a distance raster classON$ = ""; classDesc$ = ""; distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; distanceON$ = "distras"; distanceDesc$ = "created in SML"; minLikelihoodPercent = 80; RasterClassifyMaxLikelihoodWithMask(minLikelihoodPercent, classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, Training, R1, R2, R3);
Minimum distribution angle classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyMinAngle() GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numberClasses = 15; maxIterations = 10; maxMoveSteady = 10; minSteadyPercentage = 80; RasterClassifyMinAngle(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
Minimum distribution angle classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyMinAngleWithMask() GetInputRaster(Mask); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numberClasses = 15; maxIterations = 10; maxMoveSteady = 10; minSteadyPercentage = 80; RasterClassifyMinAngleWithMask(numberClasses, maxIterations, maxMoveSteady, minSteadyPercentage, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
Minimum distance to mean classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyMinDistanceToMean() GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); GetInputRaster(R4); GetInputRaster(R5); GetInputRaster(R6); classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; distanceON$ = "distras" distanceDesc$ = "created in SML"; RasterClassifyMinDistanceToMean("Euclidean", classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Training, R1, R2, R3, R4, R5, R6);
Minimum distance to mean classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyMinDistanceToMeanWithMask() GetInputRaster(Mask); GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = "c:/tnt/win32/projects/rasclass/cb_tm.rvc"; distanceON$ = "distras" distanceDesc$ = "created in SML"; RasterClassifyMinDistanceToMeanWithMask("Euclidean", classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, Training, R1, R2, R3);
Self organization (neural net) classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifySelfOrganization() GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numberClasses = 15; maxIterations = 10; initialMinDistance = 10; maxMoveSteady = 5; minSteadyPercentage = 80; RasterClassifySelfOrganization(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", R1, R2, R3);
Self organization (neural net) classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifySelfOrganizationWithMask() GetInputRaster(Mask); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distFN$ = "c:/tnt/win32/projects/rasclass/rgbcrop.rvc"; distON$ = "kMeanD"; distDesc$ = "created in SML"; numberClasses = 15; maxIterations = 10; initialMinDistance = 10; maxMoveSteady = 5; minSteadyPercentage = 80; RasterClassifySelfOrganizationWithMask(numberClasses, maxIterations, initialMinDistance, maxMoveSteady, minSteadyPercentage, classFN$, classON$, classDesc$, distFN$, distON$, distDesc$, "NoRedistribution", Mask, R1, R2, R3);
Stepwize linear classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyStepwiseLinear() GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = ""; # this function does not create a distance raster distanceON$ = ""; distanceDesc$ = ""; numClasses = 15; maxIterations = 10; initClusterMinDist = 10; maxMoveSteady = 5; minSteadyClusterPercent = 80; RasterClassifyStepwiseLinear(classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Training, R1, R2, R3);
Stepwize linear classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifyStepwiseLinearWithMask() GetInputRaster(Mask); GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = ""; # this function does not create a distance raster distanceON$ = ""; distanceDesc$ = "'; numClasses = 15; maxIterations = 10; initClusterMinDist = 10; maxMoveSteady = 5; minSteadyClusterPercent = 80; RasterClassifyStepwiseLinearWithMask(classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, Training, R1, R2, R3);
Suits' maximum relative classification without mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifySuitsMaxRelative() GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; distanceON$ = "distras"; distanceDesc$ = "created in SML"; stdDevMultiplier = 2; RasterClassifySuitsMaxRelative(stdDevMultiplier, classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Training, R1, R2, R3);
Suits' maximum relative classification using mask raster
Where:
Parameters:
Details:
Returns:
Create Date: 19-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterClassifySuitsMaxRelativeWithMask() GetInputRaster(Mask); GetInputRaster(Training); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); classFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; classON$ = "classras"; classDesc$ = "created in SML"; distanceFN$ = "c:/tnt/win32/projects/rasclass/out.rvc"; distanceON$ = "distras"; distanceDesc$ = "created in SML"; stdDevMultiplier = 2; RasterClassifySuitsMaxRelativeWithMask(stdDevMultiplier, classFN$, classON$, classDesc$, distanceFN$, distanceON$, distanceDesc$, "NoRedistribution", Mask, Training, R1, R2, R3);
Sound a beep
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
for a = 1 to 100 beep()
Forces the SML script to check the cancel button.
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CheckCancel()
Clear console
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Screen should be clear.")
Prompt user for keyboard input of scalar
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() printf("Enter a number: "); a=input() print(a) # prints the number entered or 0 printf("Enter a number: "); a=input(2) print(a) # prints the number entered or 2
Capture string input from keyboard
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() print("Enter a number. ") ; a$=input$() print(StrToNum(a$))
Sends unformated output to console
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() str1$="This is line " str2$="you see." str3$="The next is\nline 3." number=1 print(str1$, number, str2$) print(str3$)
Send formatted output to the console
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() format$="%s%d%s\n%s" str1$="This is line " str2$="you see." str3$="This is line 2" number = 1 print(str1$, number, str2$, str3$) printf(format$, str1$, 1, str2$, str3$)
Prints the matrix to the console.
Where:
Parameters:
Details:
Returns:
Create Date: 18-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of PrintMatrixToConsole()
Displays as status bar at the bottom of the console window
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(Rin) # get the input raster numColumns = NumCols(Rin) numLines = NumLins(Rin) stepSize = int(numLines / 10) status = 0 # set up to display status bar for r = 1 to numLines { for c = 1 to numColumns { # invert all values Rin[r,c] = 255 - Rin[r,c] } if (!int( r % stepSize)) { # handle status bar code status = status + 10 SetStatusBar(status, 100) SetStatusMessage("Calculating new raster values.") } } CloseRaster(Rin)
Displays a message at the bottom of the console window
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputRaster(Rin) # get the input raster numColumns = NumCols(Rin) numLines = NumLins(Rin) stepSize = int(numLines / 10) status = 0 # set up to display status bar for r = 1 to numLines { for c = 1 to numColumns { # invert all values Rin[r,c] = 255 - Rin[r,c] } if (!int( r % stepSize)) { # handle status bar code status = status + 10 SetStatusBar(status, 100) SetStatusMessage("Calculating new raster values.") } } CloseRaster(Rin)
Do subsequent drawing with a given graphics context
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ActivateGC()
Create a graphics context
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateGCForDrawingArea()
Destroy a graphics context
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DestroyGC()
Draw an arc
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawArc()
Draw non-filled arc chord
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawArcChord()
Draw non-filled arc wedge
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawArcWedge()
Draw a circle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawCircle()
Draw an ellipse
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawEllipse()
Draw text using the interface font
Where:
Parameters:
Details:
Returns:
Create Date: 12-Sep-2000
Modify Date: none
Available in SML for Windows: Yes
Overide current coordinate transformation matrix to local one
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawLocalBegin()
Restore coordinate transformation matrix to one before call to DrawLocalBegin()
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawLocalEnd()
Draw single point
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawPoint()
Draw polyline
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawPolyLine()
Draw a rectangle
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawRect()
Draw non-filled Region
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawRegion()
Set fill style out of current style object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawSetFillStyle()
Set line style out of current style object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawSetLineStyle()
Set point style out of current style object
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawSetPointStyle()
Set the colors for text drawing
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawTextSetColors()
Set font for text drawing
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawTextSetFont()
Sets text height in coordinate units
Where:
Parameters:
Details:
Returns:
Create Date: 14-Jan-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DrawTextSetHeight()
Set text height
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawTextSetHeightPixels()
Draw a text string
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawTextSimple()
Draw line from current pen position to a point
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawTo()
Reset style object to default
Where:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawUseDefaultStyleObject()
Change the style object used for subsequent calls to SetStyle() functions
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DrawUseStyleObject()
Fill an arc chord with the current fill style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillArcChord()
Fill an arc wedge with the current fill style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillArcWedge()
Fill a circle with the current fill style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillCircle()
Fill an ellipse with the current fill style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillEllipse()
Draw filled polyline with current fill mode
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillPolyLine()
Fill a rectangle with the current fill style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillRect()
Fill a Region with the current fill style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of FillRegion()
Return a pixel value given a color
Where:
Parameters:
Details:
Returns:
Create Date: 29-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GetColorPixel()
Return a COLOR given a color name from rgb.txt
Where:
Parameters:
Details:
Returns:
Create Date: 30-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GetNamedColor()
Return a pixel value given a color name from rgb.txt
Where:
Parameters:
Details:
Returns:
Create Date: 29-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GetNamedColorPixel()
Draw a line with the current line style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LineStyleSetPoints()
Draws a Region with current line style
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LineStyleSetRegion()
Move pen
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of MoveTo()
Set color by color structure
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of SetColor()
Set color by name
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of SetColorName()
Set color by red, green, blue values
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of SetColorRGB()
Set the drawing line width
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of SetLineWidth()
Used to make labels line up.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of AlignWidgets()
Close a histogram
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CloseViewHistogram()
Create a button row
Where:
Parameters:
Details:
Returns:
Create Date: 20-Mar-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateButtonRow()
Create a drawing area.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateDrawingArea()
Create a form
Where:
Parameters:
Details:
Returns:
Create Date: 24-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CreateForm()
Create a form dialog to put widgets in.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# DIALOG1.SML # Sample script for Getting Started. # Creates and opens a simple dialog window. # Define parent widget for dialog window. class XmForm win1; # Procedure for closing window proc OnClose() { DialogClose(win1); DestroyWidget(win1); } # Set up dialog window win1 = CreateFormDialog("Hello World"); win1.MarginHeight = 5; win1.MarginWidth = 5; # Create label text for window class XmLabel winLabel; winLabel = CreateLabel(win1,"Sample Dialog Window"); winLabel.TopWidget = win1; winLabel.LeftWidget = win1; winLabel.LeftOffset = 10; winLabel.RightWidget = win1; winLabel.RightOffset = 10; # Create Close button attached to label on # on top and to window margin on left and right class XmPushButton closeButton; closeButton = CreatePushButton(win1,"Close"); closeButton.TopWidget = winLabel; closeButton.TopOffset = 5; closeButton.leftWidget = win1; closeButton.rightWidget = win1; closeButton.bottomWidget = win1; WidgetAddCallback(closeButton.ActivateCallback,OnClose); # Open dialog window and keep script active # until window is closed. DialogOpen(win1); DialogWaitForClose(win1); # Example of CreateFormDialog()
Create a frame around widgets.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateFrame()
Create a horizontal line on a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateHorizontalSeparator()
Create an HTML widget
Where:
Parameters:
Details:
Returns:
Create Date: 17-Nov-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateHTMLWidget()
Creates an icon button row
Where:
Parameters:
Details:
Returns:
Create Date: 20-Mar-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateIconButtonRow()
Add an icon to a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateIconLabel()
Add an icon pushbutton to a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateIconPushButton()
Add an icon toggle button to a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateIconToggleButton()
Create a label on a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CreateLabel()
Create an XmList widget
Where:
Parameters:
Details:
Returns:
Create Date: 10-Aug-2000
Modify Date: 10-Aug-2000
Available in SML for Windows: No
Create a menu item
Where:
Parameters:
Details:
Returns:
Create Date: 16-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateMenuItem()
Create a modal form dialog to put widgets in.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateModalFormDialog()
Create an option menu
Where:
Parameters:
Details:
Returns:
Create Date: 05-Jun-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateOptionMenu()
Create a prompt for numeric value.
Where:
Parameters:
Details:
Returns:
Create Date: 20-Mar-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreatePromptNum()
Create a prompt for string value.
Where:
Parameters:
Details:
Returns:
Create Date: 20-Mar-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreatePromptStr()
Create a (text) pushbutton.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CreatePushButton()
Create a button item.
Where:
Parameters:
Details:
Returns:
Create Date: 16-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreatePushButtonItem()
Creates a row/column form
Where:
Parameters:
Details:
Returns:
Create Date: 24-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateRowColumn()
Create an XmScrolledWindow and XmList widget
Where:
Parameters:
Details:
Returns:
Create Date: 10-Aug-2000
Modify Date: 10-Aug-2000
Available in SML for Windows: No
Creates a form with scroll bars
Where:
Parameters:
Details:
Returns:
Create Date: 29-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateScrolledWindow()
Create a (text) toggle button.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateToggleButton()
Create a toggle button item.
Where:
Parameters:
Details:
Returns:
Create Date: 16-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateToggleButtonItem()
Add a tooltip to a drawing area.
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateToolTip()
Create an option menu for selecting units
Where:
Parameters:
Details:
Returns:
Create Date: 26-Sep-2000
Modify Date: none
Available in SML for Windows: No
Create a vertical line on a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateVerticalSeparator()
Pop up a histogram of a Raster with an optional Region.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of CreateViewHistogram()
Destroy tooltip.
Where:
Parameters:
Details:
Returns:
Create Date: 20-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DestroyToolTip()
Destroy a widget.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DestroyWidget()
Close a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DialogClose()
Sets dialog to full screen mode
Where:
Parameters:
Details:
Returns:
Create Date: 24-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DialogFullScreen()
Open a dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DialogOpen()
Moves dialog to bottom of visible windows
Where:
Parameters:
Details:
Returns:
Create Date: 27-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DialogToBottom()
Moves dialog to top of visible windows
Where:
Parameters:
Details:
Returns:
Create Date: 27-Apr-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DialogToTop()
Wait for user to close given modal dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DialogWaitForClose()
Wait for a dialog to open
Where:
Parameters:
Details:
Returns:
Create Date: 12-May-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DialogWaitForOpen()
Set the parent widget for popup dialogs
Where:
Parameters:
Details:
Returns:
Create Date: 14-Aug-2000
Modify Date: 14-Aug-2000
Available in SML for Windows: No
Force update of histogram to current Region.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of UpdateViewHistogram()
Register function to call when an action happens on a widget.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of WidgetAddCallback()
Create a status context from a status handle
Where:
Parameters:
Details:
Returns:
Create Date: 20-May-1998
Modify Date: 20-May-1998
Available in SML for Windows: Yes
Example:
# Example of StatusContextCreate()
Destroy a status context
Where:
Parameters:
Details:
Returns:
Create Date: 20-May-1998
Modify Date: 20-May-1998
Available in SML for Windows: Yes
Example:
# Example of StatusContextDestroy()
Create a status dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: 12-Oct-2000
Available in SML for Windows: No
Example:
# Example of StatusDialogCreate()
Destroy a status dialog.
Where:
Parameters:
Details:
Returns:
Create Date: 23-Jan-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of StatusDialogDestroy()
Set the value of a status bar
Where:
Parameters:
Details:
Returns:
Create Date: 20-May-1998
Modify Date: 20-May-1998
Available in SML for Windows: Yes
Example:
# Example of StatusSetBar()
Set the "current" status line.
Where:
Parameters:
Details:
Returns:
Create Date: 20-May-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of StatusSetDefaultHandle()
Set the text message for a status bar
Where:
Parameters:
Details:
Returns:
Create Date: 20-May-1998
Modify Date: 20-May-1998
Available in SML for Windows: Yes
Example:
# Example of StatusSetMessage()
Close an open watershed handle
Where:
Parameters:
Details:
Returns:
Create Date: 28-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Computes different hydrological features depends on flags
Where:
Parameters:
Details:
Returns:
Create Date: 28-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Computes different hydrological elements as flow paths, basins, ridges depends on selected set of seed points and/or flags
Where:
Parameters:
Details:
Returns:
Create Date: 28-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Convert region given by filename and objectname to mask according an operation
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Fills depressions in different ways depends on selected set of watersheds with depressions and/or flags
Where:
Parameters:
Details:
Returns:
Create Date: 28-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get current basin value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get current branch value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get watershed polygon ID in watershed system for given vector polygon element ID
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get current inlet value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get mask as filename ans objname
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of double pour points in watershed system
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of output objects that were calculated
Where:
Parameters:
Details:
Returns:
Create Date: 28-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of pour points in watershed system
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of vector polygons in watershed system
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of watershed polygons in watershed system
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of watershed polygons with depression in watershed system
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get mask as filename ans objname
Where:
Parameters:
Details:
Returns:
Create Date: 31-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get current outlet value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get pour object
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get status of watershed process
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get watershed polygon object
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Initialize watershed (returns handle)
Where:
Parameters:
Details:
Returns:
Create Date: 28-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Is valley set separated
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Inverse value for all cells in mask
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set value for all cells in mask
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Close an open watershed polygon handle
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get ID of lower pour point by index
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get ID of upper pour point by index
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get element ID of vector polygon by index
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get maximum z value inside watershed
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get minimum z value inside watershed
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of lower pours in watershed
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of upper pours in watershed
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get number of vector polygons in watershed
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get minimum z value on watershed boundary
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Does watershed polygon have a depression
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Is watershed polygon valid
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Close an open watershed pour handle
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get element ID of vector point
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get left watershed ID
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get location of pour point as POINT3D in original DEM coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get right watershed ID
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Get type of pour
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Is pour valid
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set value as current basin value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set value as current branch value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set value as current inlet value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set mask from extrnal bynary raster by filename ans objname
Where:
Parameters:
Details:
Returns:
Create Date: 30-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set value as current outlet value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Set valley separation by given value
Where:
Parameters:
Details:
Returns:
Create Date: 29-Aug-2000
Modify Date: none
Available in SML for Windows: Yes
Copy an image from source frame to destination frame
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Copy an image from view to frame
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Create frame by width and height (returns handle)
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Create frame from view (returns handle)
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Create a Graphics Context (GC) for a Frame class
Where:
Parameters:
Details:
Returns:
Create Date: 05-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Destroy an open frame handle
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Get frame height
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Get frame width
Where:
Parameters:
Details:
Returns:
Create Date: 04-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Surface fit by Bidirectional method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitBidirectional() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "Bidirectional", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); acrossLineMethod$ = "Linear"; alongLineMethod$ = "Linear"; directionType$ = "Automatic"; direction = 0.0; # not used if Automatic mode selectLines$ = ""; valueLines$ = ""; SurfaceFitBidirectional(V, R, acrossLineMethod$, alongLineMethod$, directionType$, direction, selectLines$, valueLines$); CloseRaster(R); CloseVector(V);
Surface fit by inverse distance method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitInverseDistance() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "InvDist", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); R = 0 # zero out the Raster usePoints = 1; useLines = 0; searchMethod$ = "Circle" searchDist = 40.0; weightPower = 2.0; selectPoints$ = ""; selectLines$ = ""; valuePoints$ = ""; valueLines$ = ""; SurfaceFitInverseDistance(V, R, usePoints, useLines, searchMethod$, searchDist, weightPower, selectPoints$, selectLines$, valuePoints$, valueLines$); CloseRaster(R); CloseVector(V);
Surface fit by minimum curvature method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitMinimumCurvature() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "MinCurve", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); R = 0 # zero out the Raster usePoints = 1; useLines = 0; searchMethod$ = "Circle" searchDist = 30.0; weightPower = 2.0; tension = 0.0; selectPoints$ = ""; selectLines$ = ""; valuePoints$ = ""; valueLines$ = ""; SurfaceFitMinimumCurvature(V, R, usePoints, useLines, searchMethod$, searchDist, weightPower, tension, selectPoints$, selectLines$, valuePoints$, valueLines$); CloseRaster(R); CloseVector(V);
Surface fit by polynomial method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitPolynomial() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "Poly", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); R = 0 # zero out the Raster polyOrder = 3; usePoints = 1; useLines = 0; selectPoints$ = ""; selectLines$ = ""; valuePoints$ = ""; valueLines$ = ""; SurfaceFitPolynomial(V, R, usePoints, useLines, polyOrder, selectPoints$, selectLines$, valuePoints$, valueLines$); CloseRaster(R); CloseVector(V);
Surface fit by profiles method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitProfiles() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "Profile", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); R = 0 # zero out the Raster searchDist = 130.0; usePoints = 0; useLines = 1; selectPoints$ = ""; selectLines$ = ""; valuePoints$ = ""; valueLines$ = ""; SurfaceFitProfiles(V, R, usePoints, useLines, searchDist, selectPoints$, selectLines$, valuePoints$, valueLines$); CloseRaster(R); CloseVector(V);
Surface fit TIN by linear method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitTINLinear() GetInputTIN(T); georef = GetLastUsedGeorefObject(T); CreateRasterFromObject(T, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "TINLinear", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); R = 0 # zero out the Raster SurfaceFitTINLinear(T, R); CloseRaster(R);
Surface fit TIN by quintic method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitTINQuintic() GetInputTIN(T); georef = GetLastUsedGeorefObject(T); CreateRasterFromObject(T, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "TINQuintic", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); SurfaceFitTINQuintic(T, R); CloseRaster(R);
Surface fit by triangulation method
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1999
Modify Date: 09-Mar-2000
Available in SML for Windows: Yes
Example:
# Example of SurfaceFitTriangulation() GetInputVector(V); georef = GetLastUsedGeorefObject(V); CreateRasterFromObject(V, R, "c:/tnt/win32/data/surfmodl/SurfTest.rvc", "Triangle", "SML Surface Modeling", 30, 30, "16-bit unsigned", georef); R = 0 # zero out the Raster tolerance = 0.0; usePoints = 1; useLines = 0; selectPoints$ = ""; selectLines$ = ""; valuePoints$ = ""; valueLines$ = ""; SurfaceFitTriangulation(V, R, usePoints, useLines, tolerance, selectPoints$, selectLines$, valuePoints$, valueLines$); CloseRaster(R); CloseVector(V);
Activate a given tool.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewActivateTool()
Add "standard" tools to a view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewAddStandardTools()
Create icons for tools added.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewAddToolIcons()
Destroy a view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewDestroy()
Get the current map scale of a view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewGetMapScale()
Get transformation from layer to screen.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewGetTransLayerToScreen()
Get transformation from layer to screen.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewGetTransLayerToView()
Get the transparm to translate between a map projection and view coordinates
Where:
Parameters:
Details:
Returns:
Create Date: 28-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ViewGetTransMapToView()
Get transformation from view to screen.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewGetTransViewToScreen()
Redraw view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewRedraw()
Draw view direct with drawflags
Where:
Parameters:
Details:
Returns:
Create Date: 17-Apr-2001
Modify Date: none
Available in SML for Windows: Yes
Redraw view (full).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewRedrawFull()
Redraw a view (but only if it has changed since last redraw)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewRedrawIfNeeded()
Save a snapshot of a view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewSaveSnapshot()
Set the GPS source for a view
Where:
Parameters:
Details:
Returns:
Create Date: 13-Jul-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewSetGPS()
Set the mapscale for a view (for next redraw).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewSetMapScale()
Set message in status line at bottom of view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewSetMessage()
Set status bar at bottom of view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewSetStatusBar()
Clear the status bar.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewStatusBarClear()
Translate a point from layer coordinates to view coordinates.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewTransPointLayerToView()
Translate a point from layer view to layer coordinates.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewTransPointViewToLayer()
Set view to 1X zoom and redraw.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewZoom1X()
Zoom to show full extents of view
Where:
Parameters:
Details:
Returns:
Create Date: 24-Jun-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ViewZoomFull()
Zoom in on view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewZoomIn()
Zoom out on view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewZoomOut()
Zoom so that a given group fills the view
Where:
Parameters:
Details:
Returns:
Create Date: 05-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ViewZoomToGroup()
Zoom so that a given layer fills the view
Where:
Parameters:
Details:
Returns:
Create Date: 05-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ViewZoomToLayer()
Create a display or hardcopy layout
Where:
Parameters:
Details:
Returns:
Create Date: 11-Jun-1998
Modify Date: 20-Mar-2001
Available in SML for Windows: Yes
Example:
# Example of LayoutCreate()
Create a view for a layout.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayoutCreateView()
Destroy a layout and all the groups in it
Where:
Parameters:
Details:
Returns:
Create Date: 04-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayoutDestroy()
Get a group pointer given group name.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayoutGetGroupByName()
Popup page setup dialog for a layout
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1999
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayoutPageSetupDialog()
Print a layout
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1999
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayoutPrint()
Read a saved display layout from a file
Where:
Parameters:
Details:
Returns:
Create Date: 11-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayoutRead()
Save a display layout to a file
Where:
Parameters:
Details:
Returns:
Create Date: 11-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayoutWrite()
Create a 2d group on a display.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispCreate2DGroup()
Set horizontal position of display group in layout
Where:
Parameters:
Details:
Returns:
Create Date: 12-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupAttachHorizontal()
Set vertical position of display group in layout
Where:
Parameters:
Details:
Returns:
Create Date: 12-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupAttachVertical()
Create a group
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupCreate()
Create a 3d view of a group.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupCreate3DView()
Create layer manager as a form, (not a dialog)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupCreateLayerManagerForm()
Create a 2d view of a group.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupCreateView()
Destroy a group.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupDestroy()
Get a layer pointer given the layer name.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupGetLayerByName()
Create "layer manager" dialog
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupOpenLayerManagerWindow()
Read a saved display group from a file
Where:
Parameters:
Details:
Returns:
Create Date: 11-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupRead()
Remove all layers from a group.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupRemoveAllLayers()
Set the active layer for a group
Where:
Parameters:
Details:
Returns:
Create Date: 05-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupSetActiveLayer()
Save a display group to a file
Where:
Parameters:
Details:
Returns:
Create Date: 11-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupWrite()
Set a CAD variable to point to the CAD object from a CADLayer
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CADLayerGetObject()
Change the object used by a CAD layer
Where:
Parameters:
Details:
Returns:
Create Date: 26-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of CADLayerSetObject()
Adds custom buttons to a display
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle=DispOpen() DispSetName(handle, "Window1") DispAddButtons(handle, "Close") str$=DispWaitForButtonPress(handle) if (str$ == "Window1.Close") DispClose(handle)
Register function to call when an action happens on a view.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispAddCallback()
Adds a raster layer to a display window
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() fileName$="/data/standard/cb_tm.rvc" obname$="TM_2" objectNumberber=ObjectNumber(fileName$, obname$, "raster") handle=DispOpen() DispAddRaster(handle, fileName$, objectNumber) DispRedraw(handle) CloseRaster(Rvar)
Same as DispAddRaster() except uses SML raster variable
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputRaster(Rvar) # open a raster handle=DispOpen() DispAddRasterVar(handle, Rvar) DispRedraw(handle) CloseRaster(Rvar)
Add standard tools to a display, (zoom box, slide view, and measurement)
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle=DispOpen() DispAddStandardTools(handle) # adds the tools
Closes the display associated with handle displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle=DispOpen() DispAddStandardTools(handle) # adds the tools # do something with the display DispClose(handle) handle=0 # useful safety tip-always set display handles # to zero after closing the display.
Returns the current map scale of the display associated with displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle=DispOpen() DispQuickAddRaster(handle, Rvar) DispRedraw(handle) print(DispGetMapScale(handle)) DispClose(handle)
Get the raster used by a given layer.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispGetRasterFromLayer()
Get the vector used by a given layer.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispGetVectorFromLayer()
Returns the label of the last button that was pressed
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle1=DispOpen() DispSetName(handle1, "Window1") DispAddButtons(handle1, "Close") str$=DispLastButtonPressed(handle1) # reset button so it can be used again DispResetButtons(handle1) if (str$ == "Close") then DispClose(handle1)
Opens a display and returns a handle to the display
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() disp1=DispOpen() ; disp2=DispOpen() DispSetTitle(disp1, "Display 1") # set the titles DispSetTitle(disp2, "Display 2")
Pan to a given location.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear(); OpenRaster(R, "c:/tnt/benchmarks/benchmrk.sml", "milogo24"); mydisp = DispOpen(700,500); DispQuickAddRasterVar(mydisp, R); DispRedraw(mydisp); DispZoomIn(mydisp,4,1); DispPanTo(mydisp,.03,.03,1);
Adds a CAD layer to display window referenced by displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() fileName$="/data/standard/cb_tm.rvc" obname$="railroads" objectNumberber=ObjectNumber(fileName$, obname$, "CAD") handle=DispOpen() DispQuickAddCAD(handle, fileName$, objectNumber) DispRedraw(handle)
Quick add a CAD object to a Disp window given a CAD variable
Where:
Parameters:
Details:
Returns:
Create Date: 06-Jul-2001
Modify Date: none
Available in SML for Windows: No
Adds a raster layer to display window referenced by displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() fileName$="/data/standard/cb_tm.rvc" obname$="TM_2" objectNumberber=ObjectNumber(fileName$, obname$, "raster") handle=DispOpen() DispQuickAddRaster(handle, fileName$, objectNumber) DispRedraw(handle)
Same as DispQuickAddRaster() except uses SML raster variable
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
class Disp handle; clear(); GetInputRaster(Rvar); # open a raster handle=DispOpen(); rLayer = DispQuickAddRasterVar(handle, Rvar); DispRedraw(handle);
Adds a TIN layer to display window referenced by displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() fileName$="/data/standard/cb_tm.rvc" obname$="TIN object" objectNumberber=ObjectNumber(fileName$, obname$, "raster") handle=DispOpen() DispQuickAddTIN(handle, fileName$, objectNumber) DispRedraw(handle)
Quick add TIN object to a Disp window given a TIN variable
Where:
Parameters:
Details:
Returns:
Create Date: 06-Jul-2001
Modify Date: none
Available in SML for Windows: No
Adds a vector layer to display window referenced by displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() fileName$="/data/standard/cb_tm.rvc" obname$="railroads" objectNumberber=ObjectNumber(fileName$, obname$, "raster") handle=DispOpen() DispQuickAddRaster(handle, fileName$, objectNumber) DispRedraw(handle)
Same as DispQuickAddVector() except uses SML vector variable
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(Vvar) # open a vector handle=DispOpen() DispQuickAddVector(handle, Vvar) DispRedraw(handle)
Same as clicking "Redraw"
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(Vvar) # open a vector handle=DispOpen() DispQuickAddVector(handle, Vvar) DispRedraw(handle)
Same as clicking "Full view"
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(Vvar) # open a vector handle=DispOpen() DispQuickAddVectorVar(handle, Vvar) DispRedrawFull(handle)
Removes all layers from display referenced by displayNumber
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
handle=DispOpen() GetInputVector(Vvar1) # open a vector GetInputVector(Vvar1) # open a second vector DispQuickAddVectorVar(handle, Vvar1) DispQuickAddVectorVar(handle, Vvar2) DispRedrawFull(handle) DispRemoveAllLayers(handle)
Forces system to "forget" last button pressed
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle1=DispOpen() DispSetName(handle1, "Window1") DispAddButtons(handle1, "Close") str$=DispWaitForButtonPress(handle1) # reset button so it can be used again DispResetButtons(handle1) if (str$ == "Close") then DispClose(handle1)
Set the background color of a display
Where:
Parameters:
Details:
Returns:
Create Date: 30-Jul-1999
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispSetBackgroundColor()
Sets the map scale for a display
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle=DispOpen() DispSetMapScale(handle, 24000) # sets map scale to 1:24,000
Displays string in message area of display window
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
handle=DispOpen() DispSetMessage(handle, "This is a message")
Set Raster cells to layer index of Raster with largest/smallest cell value in a group
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispSetMinMaxIndexFromGroup() class disp handle; GetOutputRaster(Rout); GetInputRaster(R1); GetInputRaster(R2); GetInputRaster(R3); handle = DispOpen(); DispQuickAddRasterVar(handle, R1); DispQuickAddRasterVar(handle, R2); DispQuickAddRasterVar(handle, R3); DispRedraw(handle1); DispCreateMaxRasterFromGroup(Rout, handle.Group, "Max");
Sets the name of a display window
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle1=DispOpen() ; handle2=DispOpen() DispSetName(handle1, "Window1") ; DispSetName(handle1, "Window2") str$=DispWaitForButtonPress() DispSetMessage(handle, "Button press message is " + str$) DispClose(handle1) ; DispClose(handle2)
Set the status bar on a standalone display window.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispSetStatusBar()
Displays string in title area of display window
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() DispOpen(handle) DispSetTitle(handle, "My Custom Window")
Clear the status bar.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of DispStatusBarClear()
Suspend execution and wait until button event
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() handle=DispOpen() DispSetName(handle, "Window1") str$ = DispWaitForButtonPress(handle) DispResetButtons(handle) DispSetMessage(handle, "ButtonPressed = " + str$) DispClose(handle)
Same as clicking "Zoom 1X"
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
GetInputVector(Rvar) # open a raster handle=DispOpen() DispQuickAddRasterVar(handle, Rvar) DispZoom1X(handle)
Same as clicking "Zoom In"
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(Rvar) # open a raster handle=DispOpen() DispQuickAddRasterVar(handle, Rvar) DispZoom1X(handle, true) # sets current zoomFactor to one # zoom in to four pixels per raster cell, with redraw DispZoomIn(handle, 4, true) # zoom in to eight pixels per raster cell, with redraw DispZoomIn(handle) # zoomFactor==2, redraw==true are implied
Same as clicking "Zoom Out"
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear() GetInputVector(Rvar) # open a raster handle=DispOpen() DispQuickAddRasterVar(handle, Rvar) DispZoom1X(handle,true) # sets current zoomFactor to one # zoom out to four pixels per raster cell, with redraw DispZoomOut(handle, 4, true) # zoom out to eight pixels per raster cell, with redraw DispZoomOut(handle) # zoomFactor==2, redraw==true are implied
Pan to a given location.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
clear(); OpenRaster(R, "c:/tnt/benchmarks/benchmrk.sml", "milogo24"); mydisp = DispOpen(700,500); DispQuickAddRasterVar(mydisp, R); DispRedraw(mydisp);
Add a MapGridLayer to a group
Where:
Parameters:
Details:
Returns:
Create Date: 01-Feb-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupAddMapGridLayer()
Add a raster to a group by name
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupAddRaster()
Add a raster to a group.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupAddRasterVar()
Quick add a CAD layer (prompt).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupQuickAddCAD()
Quick add a CAD layer given a CAD variable
Where:
Parameters:
Details:
Returns:
Create Date: 07-Jun-2001
Modify Date: none
Available in SML for Windows: Yes
Add a database pinmap to a group.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupQuickAddDBPinmap()
Quick add a Raster layer (prompt).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupQuickAddRaster()
Quick add a Raster layer given SML variable.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupQuickAddRasterVar()
Quick add a region layer given a region variable"
Where:
Parameters:
Details:
Returns:
Create Date: 15-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GroupQuickAddRegionVar()
Quick add a TIN layer (prompt).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupQuickAddTIN()
Quick add a TIN layer given a TIN variable
Where:
Parameters:
Details:
Returns:
Create Date: 07-Jun-2001
Modify Date: none
Available in SML for Windows: Yes
Quick add a Vector layer (prompt).
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupQuickAddVector()
Quick add a Vector layer given SML variable.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GroupQuickAddVectorVar()
Destroy a layer.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayerDestroy()
Hide a layer.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayerHide()
Lower a layer. Returns 1 if moved, 0 if already at bottom of group.
Where:
Parameters:
Details:
Returns:
Create Date: 04-Feb-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayerLower()
Open layer controls.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayerOpenControls()
Raise a layer. Returns 1 if moved, 0 if already at top of group.
Where:
Parameters:
Details:
Returns:
Create Date: 04-Feb-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayerRaise()
Show a layer.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of LayerShow()
Add a ScaleBarLayer to a layout
Where:
Parameters:
Details:
Returns:
Create Date: 01-Feb-1999
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayoutAddScaleBarLayer()
Add a text Layer to a layout
Where:
Parameters:
Details:
Returns:
Create Date: 03-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of LayoutAddTextLayer()
Find the element closest to a given point in a PinmapLayer
Where:
Parameters:
Details:
Returns:
Create Date: 12-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of PinmapLayerFindClosest()
Gets field information for a pin map layer
Where:
Parameters:
Details:
Returns:
Create Date: 06-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of PinmapLayerGetFieldInfo()
Open a pinmap layer database
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of PinmapLayerOpenDatabase()
Change the object used by a pinmap layer
Where:
Parameters:
Details:
Returns:
Create Date: 26-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of PinmapLayerSetObject()
Set a raster variable to point to the raster object from a RasterLayer
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterLayerGetObject()
Change the object used by a raster layer
Where:
Parameters:
Details:
Returns:
Create Date: 26-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RasterLayerSetObject()
Set a region variable to point to the region from a RegionLayer
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RegionLayerGetObject()
Change the object used by a region layer
Where:
Parameters:
Details:
Returns:
Create Date: 26-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of RegionLayerSetObject()
Set a TIN variable to point to the TIN object from a TINLayer
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TINLayerGetObject()
Change the object used by a TIN layer
Where:
Parameters:
Details:
Returns:
Create Date: 26-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of TINLayerSetObject()
Register function to call for tool events
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ToolAddCallback()
Set the GPS source of a tool
Where:
Parameters:
Details:
Returns:
Create Date: 28-Jul-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ToolSetGPS()
Set a vector variable to point to the vector object from a VectorLayer
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of VectorLayerGetObject()
Change the object used by a vector layer
Where:
Parameters:
Details:
Returns:
Create Date: 26-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of VectorLayerSetObject()
Add simple viewpoint controls to 3D view
Where:
Parameters:
Details:
Returns:
Create Date: 30-Jul-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of View3DAddSimpleControls()
Read 3D view settings from ini file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of View3DReadPosIni()
Write 3D view settings to ini file.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of View3DWritePosIni()
Create a 3D view position tool on a view
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreate3DViewPosTool()
Add Examine Raster tool icon to view.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateExamineRasterTool()
Add HyperIndex tool icon to view.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateHyperIndexTool()
Add a line drawing tool to a view
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
Add Measurement tool icon to view.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: 30-Oct-1998
Available in SML for Windows: No
Example:
# Example of ViewCreateMeasureTool()
Add multiple polygon drawing tool icon to view.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateMultiPolygonTool()
Create a point tool
Where:
Parameters:
Details:
Returns:
Create Date: 22-May-1998
Modify Date: 22-May-1998
Available in SML for Windows: No
Example:
# Example of ViewCreatePointTool()
Add polygon drawing tool icon to view.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreatePolygonTool()
Create a tool for selecting a rectangle
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateRectangleTool()
Create a select tool on a view
Where:
Parameters:
Details:
Returns:
Create Date: 09-Apr-1998
Modify Date: 30-Oct-1998
Available in SML for Windows: No
Example:
# Example of ViewCreateSelectTool()
Add sketch tool icon to view.
Where:
Parameters:
Details:
Returns:
Create Date: 03-Feb-1998
Modify Date: 30-Oct-1998
Available in SML for Windows: No
Example:
# Example of ViewCreateSketchTool()
Create tool for sliding a view
Where:
Parameters:
Details:
Returns:
Create Date: 24-Jun-1999
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateSlideViewTool()
Add the ToolBox tool for a view
Where:
Parameters:
Details:
Returns:
Create Date: 30-Oct-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateToolBoxTool()
Create zoom box tool for a view
Where:
Parameters:
Details:
Returns:
Create Date: 24-Jun-1999
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewCreateZoomBoxTool()
Draws a single pinmap element
Where:
Parameters:
Details:
Returns:
Create Date: 04-Aug-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of ViewDrawPinmapElement()
Open the 3D controls.
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of ViewOpen3DControls()
Used to register functions to call for GPS actions
Where:
Parameters:
Details:
Returns:
Create Date: 01-Dec-1997
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GPSAddCallback()
Close a GPS Port
Where:
Parameters:
Details:
Returns:
Create Date: 29-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GPSClose()
Return the name of a GPS source given its number
Where:
Parameters:
Details:
Returns:
Create Date: 29-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GPSGetSourceName()
Return number of GPS sources configured
Where:
Details:
Returns:
Create Date: 29-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GPSNumSources()
Open a GPS port
Where:
Parameters:
Details:
Returns:
Create Date: 29-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of GPSOpen()
Obsolete - use GPSClose()
Where:
Parameters:
Details:
Returns:
Create Date: 10-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# example of GPSPortClose() # declare class variables class GPSPort gpsport; class GPSData gpsdata; # open the port gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:"); gpsdata = GPSPortRead(gpsport); # close the port GPSPortClose(gpsport);
Obsolete - use GPSOpen()
Where:
Parameters:
Details:
Returns:
Create Date: 10-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# example of GPSPortOpen() # declare class variables class GPSPort gpsport; class GPSData gpsdata; # open the port gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:"); gpsdata = GPSPortRead(gpsport); # close the port GPSPortClose(gpsport);
Read data from a GPS port
Where:
Parameters:
Details:
Returns:
Create Date: 13-Apr-1998
Modify Date: 18-Jun-1998
Available in SML for Windows: Yes
Example:
# example of GPSPortRead() # declare class variables class GPSPort gpsport; class GPSData gpsdata; clear() # open the port gpsport = GPSPortOpen("COM1", "NMEA", ":4800:8:none:1:"); print(gpsport.protocol, gpsport.name, gpsport.portparm); while (1) { # now read data print(gpsport.protocol, gpsport.name, gpsport.portparm, "\n"); gpsdata = GPSPortRead(gpsport); print(gpsdata.source); if (gpsdata.positionXYIsValid) print("x y", gpsdata.position.x, gpsdata.position.y); if (gpsdata.positionZIsValid) print("z ", gpsdata.position.z); if (gpsdata.velocityXYIsValid) print("vx vy ", gpsdata.velocity.x, gpsdata.velocity.y); if (gpsdata.velocityZIsValid) print("vz ", gpsdata.velocity.z); if (gpsdata.headingIsValid) print("heading", gpsdata.heading); if (gpsdata.speedIsValid) print("speed", gpsdata.speed); if (gpsdata.numberSatellitesIsValid) print("number of satellites", gpsdata.numberOfSatellites); printf("\n\n"); sleep(1); clear(); } # close the port GPSPortClose(gpsport);
Popup the GPS Source Manager dialog
Where:
Details:
Returns:
Create Date: 19-Nov-1998
Modify Date: none
Available in SML for Windows: No
Example:
# Example of GPSSourceManagerOpen()
Get allocated center node from postion
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGet()
Get Allocated center average impedance
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetAverageImpedance()
Get Allocated center capacity
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetCapacity()
Get allocated center color
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGetColor()
Get Allocated center demand
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetDemand()
Get Allocated center impedance delay
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetImpedanceDelay()
Get Allocated center impedance limit
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetImpedanceLimit()
Get Allocated center maximum impedance
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetMaximumImpedance()
Get number of allocated centers
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGetNumberAllocations()
Get number of lines for an allocated center
Where:
Parameters:
Details:
Returns:
Create Date: 06-Oct- 199
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedCenterGetNumberLines()
Get allocated center position given a node
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGetPosition()
Get number of allocated lines
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedLineGetNumber()
Get allocated line position
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocatedLineGetPosition()
Close an open allocation handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationClose()
Get a text report from an allocation handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGetReport()
Get allocation position list
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGetResultPositionList()
Get allocation type (1 = ToFrom, 0 = FromTo)
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationGetType()
Recover a stop handle from a route handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAllocationRestoreCenter()
Apply a network angle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAngleApply()
Get impedance for an angle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAngleGetImpedance()
Set impedance for an angle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkAngleSetImpedance()
Calculate a multiroute from source node to destination nodes
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jan-2001
Modify Date: none
Available in SML for Windows: Yes
Add a center at a node
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterAddCenter()
Calculate allocation in
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterCalculateAllocationIn()
Calculate allocation out
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterCalculateAllocationOut()
Duplicate a center handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterCloneHandle()
Close an open center handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterClose()
Delete all centers
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterDeleteAllCenters()
Delete specific centers
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterDeleteCenters()
Get center node given position
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGet()
Get center capacity
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetCapacity()
Get list of centers
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetCentersList()
Get center color
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetColor()
Get center impedance delay
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetImpedanceDelay()
Get center impedance limit
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetImpedanceLimit()
Get number of centers
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetNumberCenters()
Get center position given node
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterGetPosition()
Set center capacity
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterSetCapacity()
Set center color
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterSetColor()
Set center impedance delay
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterSetImpedanceDelay()
Set center impedance limit
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkCenterSetImpedanceLimit()
Close an open network handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkClose()
Get number of tables of given type
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkGetNumberOfTables()
Get a table name
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkGetTableName()
Create a (main) network handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkInit()
Create a center handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkInitCenter()
Create a stop handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkInitStop()
Get demand for a line
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetDemand()
Get line direction state
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetDirectionState()
Get impedance for a line
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetImpedance()
Get line name
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetName()
Get the node a line is coming from
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetNodeFrom()
Get the node a line is going to
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetNodeTo()
Get number of lines
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineGetNumberLines()
Set demand for a line
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineSetDemand()
Set line direction state
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineSetDirectionState()
Set impedance for a line
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkLineSetImpedance()
Close an open network multiroute handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jan-2001
Modify Date: none
Available in SML for Windows: Yes
Calculate a route from multiroute to destination node
Where:
Parameters:
Details:
Returns:
Create Date: 17-Jan-2001
Modify Date: none
Available in SML for Windows: Yes
Get barrier state for a node (boolean)
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkNodeGetBarrierState()
Get node name
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkNodeGetName()
Get number of nodes in network
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkNodeGetNumberNodes()
Set barrier state for a node
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkNodeSetBarrierState()
Read an attribute table
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkReadAttributeTable()
Close an open route handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteClose()
Get a line from a position
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetLine()
Get line direction
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetLineDirection()
Get a node from a position
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetNode()
Get number of lines in a route
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetNumberOfLines()
Get number of nodes in a route
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetNumberOfNodes()
Get a text report from a route handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetReport()
Get route result as line list
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetResultLineList()
Get route result as node list
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetResultNodeList()
Get route result as points
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteGetResultPointList()
Is a node a stop (boolean)
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteIsNodeStop()
Is a node a turn (boolean)
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteIsNodeTurn()
Recover a stop handle from a route handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkRouteRestoreStop()
Set default attributes for a network
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkSetDefaultAttributes()
Add a stop
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopAddStop()
Calculate a route from stop handle and route handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopCalculateRoute()
Copy a stop handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopCloneHandle()
Close an open stop handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopClose()
Delete all stops
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopDeleteAllStops()
Delete specific stops
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopDeleteStops()
Get a stop node given its position
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopGet()
Get demand for a stop
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopGetDemand()
Get number of stops
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopGetNumberStops()
Get the stop list for a stop handle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopGetStopsList()
Move a stop (change stop list order)
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopMove()
Set demand for a stop
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkStopSetDemand()
Is a table of given type and name part of network (boolean)
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkTableIsTable()
Use table to set line names
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkTableSetLineNameTableAndField()
Get turn angle
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkTurnGetAngle()
Get turn impedance
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkTurnGetImpedance()
Set turn impedance
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkTurnSetImpedance()
Write an attribute table
Where:
Parameters:
Details:
Returns:
Create Date: 17-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of NetworkWriteAttributeTable()
Close a table opened via DBEditor
Where:
Parameters:
Details:
Returns:
Create Date: 15-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorCloseTable()
Creates a DBEDITOR handle for a given database.
Where:
Parameters:
Details:
Returns:
Create Date: 24-May-2001
Modify Date: none
Available in SML for Windows: Yes
Destroy a DBEDITOR handle created by DBEditorCreate().
Where:
Parameters:
Details:
Returns:
Create Date: 24-May-2001
Modify Date: none
Available in SML for Windows: Yes
Pops up a modal dialog to edit a database record
Where:
Parameters:
Details:
Returns:
Create Date: 22-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorModalSingleRecordView()
Open single record view of a table
Where:
Parameters:
Details:
Returns:
Create Date: 15-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorOpenSingleRecordView()
Open a tabular view form of a table
Where:
Parameters:
Details:
Returns:
Create Date: 15-Apr-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorOpenTabularView()
Create XmForm with controls to edit a database record
Where:
Parameters:
Details:
Returns:
Create Date: 23-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorSingleRecordWidgetCreate()
Get a field value (numeric) from a Sincle Record Widget
Where:
Parameters:
Details:
Returns:
Create Date: 25-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorSingleRecordWidgetGetFieldNum()
Get a field value (string) from a Sincle Record Widget
Where:
Parameters:
Details:
Returns:
Create Date: 25-Jun-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorSingleRecordWidgetGetFieldStr()
Save changes to a record in a SingleRecordWidget (returns record number)
Where:
Parameters:
Details:
Returns:
Create Date: 23-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorSingleRecordWidgetSaveChanges()
Set the value of a field in a Single Record Widget
Where:
Parameters:
Details:
Returns:
Create Date: 23-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorSingleRecordWidgetSetField()
Load a record into a SingleRecordWidget
Where:
Parameters:
Details:
Returns:
Create Date: 23-Sep-1998
Modify Date: none
Available in SML for Windows: Yes
Example:
# Example of DBEditorSingleRecordWidgetSetRecord()
Total Number of Functions: 954