Description

A BOOLEAN property of each Feature setting and reflecting the Selected status.

Property type

A Variant value.  

Syntax

object.Selected([Selector]) [= value]

The Selected Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McLines.
SelectorOptional. A Variant value.

An empty variant, a single negative value, a single index value, or an array of zero or more index values (negative index values are legal but will be ignored).

If the Selector argument is a non-negative scalar value, then Selected status of the indicated feature from the collection is exposed as a scalar True/False value.

If the Selector argument is a scalar value of negative one (-1), then the overall Selected status of all features from the collection are exposed or set as a scalar True/False value. The property will be True only if any feature in the collection is Selected. It will also be True if the feature is in the “reset” state (IsReset is true).

If the Selector argument is missing or any negative scalar value other than -1, then the Selected property is exposed or set as an array of Long values. The number of elements in the array will be equal to the Count property. Selected features will be noted by a non-negative index value, while deselected features will be noted by a negative value (minus the feature index plus one); this array may be subsequently used as a Selector argument for any other property to extract information about only the selected features.

If Selector is an array, then zero or positive values are treated as indices into the features collection, negative values are legal but ignored. In this case, the Selected status will be exposed as an array of Long values (encoded as above) equal to the length of the number of non-negative elements in the Selector array. Index values greater or equal to the Count property are illegal.

valueA Variant value.

Remarks

A new feature is all selected by default.

Depending on the Selector argument, the property may be a single, scalar True/False Boolean value or it may be an array of such values. The property is exposed as an array if the Selector argument is an array or if it is a negative scalar value other than minus 1.

A new McFeatures collection is all selected by default. On assignment, you may assign either a scalar Boolean True/False Selected value or an array of such Boolean values. The Selector arguement determines which features are set to the assigned Selected state. Each element in the assigning array is used and then reused as necessary to set all of the selected features; thus, when the assigning value is a scalar, all selected features are assigned the same True or False value.

On assignment with True, all three of the mcfsfDeselected, mcfsfOutOfRange and mcfsfCancelled FeatureStatusFlags are cleared. On assignment with False, the mcfsfDeselected FeatureStatusFlag is set, while the mcfsfOutOfRange and mcfsfCancelled FeatureStatusFlags are cleared.