Maptitude GISDK Help

Function Calls

 

Caliper Script contains hundreds of functions you can call from GISDK macros and dialog boxes to control the operation of an add-in, custom application or map server. Caliper Script function calls have the following general format:

 

return_value = FunctionName(argument1, argument2,...)

 

Function names are not case sensitive. Not all functions take arguments, and not all functions return a value. You can omit some function arguments to specify a null, empty, or default value. For example:

 

RedrawMap()

RedrawMap(null)

RedrawMap("My Map")

 

The first two function calls (with the argument omitted) redraw the current map. The third function call redraws the map named "My Map," regardless of which map is current. Some functions that take integer or real values will accept null as an argument. Because null often has a special meaning as an argument, refer to the documentation of individual functions.

 

If a function takes more than one argument, all commas are required:

 

s1 = SampleArea(color, style, options_array)

s2 = SampleArea(color, style, )

s3 = SampleArea(color, null, null)

 

You can use functions that have return values in expressions:

 

nw = GetLineWidth() + 1

mystring = "The current layer is " + GetLayer()

 

Function arguments can be any expression, including a call to a function with a return value:

 

CenterMap(map_name, ClickCoord())

 

If a function takes an integer argument, you must pass it an integer value. If a function takes a real argument, you can pass it either an integer or a real value.

 

s = Subarray(arr, 3, 2.5)

// Error: Subarray() takes integers

SetLineWidth(4)

// OK: SetLineWidth() takes a real

 

 

©2025 Caliper Corporation www.caliper.com