Highlight
This method will place all the features within a layer in a selection set and the highlight the features within the set. It does the following:
- Gets the current map, an AcMapMap object.
- Creates an MgSelectionBase object using the AcMapMap object as a constructor argument.
- Uses the MgLayerBase argument to get the feature source’s schema and class names.
- Uses the MgLayerBase argument to create an MgResourceIdentifier object for the layer’s feature source.
- Uses an MgFeatureService object, the MgResourceIdentifier object, and the schema and class names to get the MgClassDefinition object for the feature source.
- Uses the MgClassDefinition object to the get the class’s identity property definitions.
- Adds the name of each identity property definition to an MgFeatureQueryOptions object and to a string collection.
- Uses an MgFeatureService object, the MgResourceIdentifier object, the MgFeatureQueryOptions object, and the fully qualified feature class name (<schemaName>:<className>) to select features from the feature source and put them in an MgFeatureReader object.
- For
each feature in the reader does the following:
- Puts the feature properties into an MgPropertyCollection object. This is described in topic ReadFeature.
- Gets the value of the identity property from the property collection.
- Adds the identity property value to the MgSelectionBase object.
- Uses the MgSelectionBase object to select features in the AcMapMap object.
- Uses the AcMapMap object to highlight the selected features.