CreateGroup()
Summary
Creates multiple selection sets of records, using the classification technology of CreateTheme().
Syntax
sets = CreateGroup(string field_spec, string method, int num_classes, array options)
| Argument | Contents |
|---|---|
| field_spec | The field spec for the field on which the theme is based |
| method | The method used to generate the classes |
| num_classes | The number of classes you want to create |
For complete documentation of the methods and options to CreateGroup(), see CreateTheme().
Returns
An array of set names.
Notes
-
The arguments to CreateGroup() are similar to those of CreateTheme().
-
CreateGroup() does not actually create a theme on the layer.
-
One selection set is created for each theme class.
-
If method is specified as Categories and num_classes as null, then the function will create one set for each distinct value in the data field.
Example
// An income classification with eight classes
sets = CreateGroup("County.Income", "Quantiles", 8,)
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | There is no current layer, or the specified field(s) do not exist on the current layer |
| Escape | The user interrupted scanning of the data |
| Error | An argument or option has the wrong type or the wrong number of values, or an error occurred while scanning the data |
See Also
| Function | Summary |
|---|---|
| CreateGroupByTheme() | Creates multiple selection sets of records, using an existing theme |
| CreateTheme() | Creates a color or pattern theme on the current layer |
| TestTheme() | Provides information on the classes created by a call to CreateTheme() |