Maptitude GISDK Help

Get Location Index

 

Summary

Loads a Location index into memory, if necessary, and gets a handle to the index.

 

Syntax

index_handle = RunMacro("GISDK Get Location Index", string index_file, string layer_name, array index_properties, real offset, string offset_units)

 

Argument

Contents

index_file

The name of the Location index file

layer_name

The name of the layer corresponding to the geographic file used to create the Location index file

index_properties

The Location index file property array, as returned by the Get Location Index Properties macro

offset

Default offset distance from street

offset_units

The name of the offset distance units (plural), such as Feet or Meters

 

Return Value

An index handle (a positive integer). If the program fails to load the Location index in memory, index_handle will be 0. If the program succeeds, index_handle will be a number greater than or equal to 1.

 

Notes

Example

// Before running this example, open a map with HARTFORD.CDF and make sure that

// the Location index HARTFORD.IDX exists, both in the Tutorial folder.

folder = RunMacro("G30 Tutorial Folder")

index_file = folder + "hartford.idx"

SetAlternateInterface("geocode")

index_properties = RunMacro("GISDK Get Location Index Properties",index_file)

index_handle = RunMacro("GISDK Get Location Index", index_file,

"Hartford Streets", index_properties, 25, "Feet") 

ShowMessage("The Location index handle is " + I2S(index_handle))

 

 

©2025 Caliper Corporation www.caliper.com