Feature Selection

Complex mouse modes for feature selection use selection criteria, as controlled by two string arguments: attrName and attrValue.  The argument attrName specifies the type of criterion, which must be one of the following: 

The argument attrVal specifies a value, consistent with the criterion specified in attrName.  The first three items, are referred to below as conventional options, while the last two are referred to as layer options.  The attrName agrument can also be empty, i.e. "".  This is referred to as the unrestricted option.  The three different options are discussed below.

Conventional Options

The conventional options restrict the selection to the specified CARIS textual attribute, but not to a specific layer.  Conventional options must be used to select from among:

and attrName must be one of the following:

spelled exactly as shown, with capital and lower-case characters exactly as shown.  The attrValue argument can be either a complete value or one containing wild cards, i.e. the * character. When a conventional option is used, the particular method setSelectPointFeatureMode restricts the selection to layers that contain point features (symbols). The general methods, setSelectSingleFeatureMode and setSelectFeatureCollectionMode, utilize a type enumeration argument between 0 and 5, inclusive, which restricts the selection as follows: image, polygon, line, symbol, text, or no restriction, respectively.  The no-restriction case implies selection of any type across all conventional layers.

Layer Options

The layer options restrict the selection to a specific layer (See Overview of Data Layering).  If attrName is “Layer Name”, attrValue must be one of the following:

If setSelectPointFeatureMode is used, the specified layer should be a point (symbol) layer. (Otherwise, a null selection is guaranteed.) Similarly, when using one of the general-purpose methods, the type enumeration argument must either be 5 (no restriction), or be consistent with the type of data in the specified layer.

Selections within a layer can be further restricted by using the “Layer Name:Attribute” option. When this option is specified for attrName, attrValue must have a restrictive clause appended to the layer name value described above.  Specifically, the attrValue must have the form: [LayerName value]:[Attribute][op][value][Type], where:

Examples of attrVal, when attrName = Layer Name:Attribute

1)   townships:population<50000I

This specification assumes that the SAF defines ESRI Shape Layers, with a layer named “townships”, where the associated DBF contains a column named “population”.  The specification restricts the selection to townships with a population less than 50000, where the 50000 is to be treated as an integer (due to the “I” appended to it), when making comparisons against DBF values

2)   US states:Name=New*S

This specification assumes that the SAF defines ESRI Shape Layers, with a layer named “US states”, where the associated DBF contains a column named “Name”.  The specification makes use of the wild card character “*” to restrict the selection to states that have names beginning with “New”.

  3)   Transeint Symbols:Feature Code=AUTOCAD*

This specification restricts the selection to the “Transient Symbols” layer and, within that layer, to features that have feature codes beginning with “AUTOCAD”.

Unrestricted Option

An empty string, i.e. “”, can be entered for attrName, if no textual restrictions are desired.  Under these circumstances, attrValue is ignored.  If, when using the general-purpose methods, attrName is empty and type is 5, the selection is completely unrestricted.  If type is less than 5, the selection is restricted to layers containing the given type, i.e. no other restrictions are applied.  When using setSelectPointFeatureMode, if attrName is empty, the selection is restricted to layers containing point features, and no other restrictions are applied.