GetSetPosition()

Summary

Gets the position of a selection set on the current map layer.

Syntax

pos = GetSetPosition(string set_name)

Argument Contents
set_name The name of the selection set

Returns

An integer indicating the position of the set within the layer.

Notes

  • The set position affects the way features are drawn if they belong to more than one selection set in a layer.

  • When a feature is in more than one set, the settings from the first set are applied to the feature, followed by the settings for the second set, and so on. As a result, settings for a later set may override those for an earlier set.

  • The highest possible set position guarantees that the settings for that set will be visible for any feature in the set.

  • The layer itself is in the first set position, so the last set position is one more than the number of selection sets.

  • The same selection sets in different maps can be in different positions.

Example

// Make sure that Super High income settings are always shown
setnames = GetSets()
pos = GetSetPosition("High Income")
if pos < setnames.length+1 then SetSetPosition("High Income", setnames.length+1)

Error Codes

Error Type Meaning
NotFound The selection set does not exist

See Also

Function Summary
SetSetPosition() Sets the position of a selection set on a layer