SetSetPosition()
Summary
Sets the position of a selection set on the current map layer.
Syntax
SetSetPosition(string set_name, integer position)
| Argument | Contents |
|---|---|
| set_name | The name of the selection set |
| position | The desired position of the set within the layer |
Notes
-
The layer itself is always in the first set position, so the last set position is one more than the number of selection sets.
-
If there is a Selection selection set, it should always be in the second set position.
-
When a selection set is moved to a new set position it trades places with the selection set in that position.
-
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 same selection sets in different maps can be in different positions.
Example
//Make sure that Adjacent is in the highest possible set position
setnames = GetSets()
pos = GetSetPosition("Adjacent")
if (pos) < (setnames.length+1) then do
// Move Adjacent up one position at a time until it is last
for u = pos to (setnames.length) do
SetSetPosition("Adjacent", (u+1))
end
end
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | The selection set does not exist |
| Error | The position is invalid |
See Also
| Function | Summary |
|---|---|
| GetSetPosition() | Gets the position of a selection set on a layer |