Maptitude GISDK Help

GetRecords()

Summary

Gets an array of record handles for a selection set.

 

Changes

Added to Version 5.0.

 

Syntax

rh_array = GetRecords(string view_set, array opts)

 

Argument

Contents

view_set

The view and selection set from which record handles are gotten

 

Option

Type

Contents

Sort Order

Array

An array of arrays, each with a field name-order pair (elements described below), indicating the desired sort order.

Start

String

The first record to be returned (defaults to the first record)

Limit

Integer

The maximum number of records to return, or -1 (the default) for all.

 

Element

Type

Contents

1

String

The name of the field

2

String

"Ascending" or "Descending"

 

Returns

An array of record handles for the records in the selection set.

 

Notes

Example

//Open BDOCUMENTS\CALIPER\\< product name>\TUTORIAL\NElayers.wrkz

tutorial_folder = RunMacro("G30 Tutorial Folder")

wrkz = OpenWorkspace(tutorial_folder + "NElayers.wrkz")

tutorial_folder = RunMacro("G30 Tutorial Folder")

wrkz = OpenWorkspace(tutorial_folder + "NElayers.wrkz")rh_array = GetRecords("Place|Selection", {{"Sort Order",{{"City", "Ascending"}}}} )

ShowArray(rh_array)

 

Error Codes

Error Type

Meaning

NotFound

The specified view or set does not exist; or

some field in the Sort Order option does not exist.

 

See Also

Function

Summary

GetRecord()

Gets the record handle of the current record of a view

GetSetIDs

Gets an array of the IDs of elements in a set

IsMember()

Tests whether a record is a member of a selection set.

 

 

©2025 Caliper Corporation www.caliper.com