Function() Method

Summary

A COM method for calling a GISDK function.

Syntax

retval = Maptitude_Object.Function(string macroname, [optional Variant arg 1], [optional Variant arg2], ... [optional Variant arg9])

Argument Contents
macroname The name of the GISDK function to be run
arg1, arg2, ... arg9 The function arguments; their count and Variant types should match those specified for that function

Returns

A variant containing either the return value specified for the function, or Null.

Notes

  • If the argument specified is a string, integer, or real, then the Variant type must match.

  • If the argument is an array, then the Variant type must be a Safe Array of Variants of appropriate types.

  • A Null value can be passed as a Variant of type Null.

  • Arguments of the compound types in Caliper Script are passed as MacroVal objects in the Variants (see The MacroVal Object).

  • An old name for this method is RunMacro().

Example

Dim Gisdk As Object
Set Gisdk = CreateObject("Maptitude.AutomationServer")
map_name = Gisdk.Function("OpenMap", "c:\\temp\\test_map.map", Null)

For more information, see...

The Maptitude Object

Macro() Method

CreateObject() Method

The MacroVal Object

Accessing Maptitude as a COM Object