CreateSet()

Summary

Creates a new, empty set on the current view.

Changes

Optional options array added in Version 2019.

Syntax

new_set_name = CreateSet(string new_set_name [, array options])

Argument Contents
new_set_name The name you want to use for the new set
Option Type Contents
Never Draw Boolean If "True" the selection set is not drawn in a map. Default is "False"
Never Save Boolean If "True" the selection set will not be saved in a map, dataview or a workspace. Default is "False"
Internal Boolean If "True" the selection set will never be visible to the user in the program interface, it will not be returned inGetSets(). Default is "False"

Returns

A string that contains the name of the new set. If the name you want to use for the new set already exists, a suffix such as :1 will be appended to the name. Always use the name returned by CreateSet() when referring to the new set.

Notes

  • The options array is an optional argument.

  • You can use the standard interface macro "G30 create set" to create a new selection set for the current layer, with a unique name and default display settings.

Example

set = CreateSet("High Population")
set1 = CreateSet("Low Population")

Error Codes

Error Type Meaning
Error There is no current view

See Also

Function Summary
DeleteSet() Deletes a set from the current view
GetSets() Gets a list of the names of selection sets for a view