MouseModeAPI.setSelectSingleFeatureMode

 

long setSelectSingleFeatureMode(int type, string attrName, string attrValue, bool isSynchronous)

This method sets the state of the SDM such that a mouse down in any view displays the pick-aperture, a small box with cross-hairs, as the mouse cursor. The feature in the box, nearest the cross-hairs when the mouse button is released is selected, i.e. it is put into the Selection List,, if its attribute as named in attrName has the value given in attrValue and its type is that given by the type argument. (See Feature Selection Criteria).  If no feature in the pick-aperture satisfies this selection criteria, no feature is selected.

The client using isSynchronous = TRUE must test for completion of the operation (See Synchronous vs. Asynchronous Response). When isSynchronousOpComplete returns TRUE, the client must call getRespondingViewIndex to determine the index of the view in which the user clicked.

The client using isSynchronous = FALSE, must have identified itself to the MouseModeAPI object (see Synchronous vs. Asynchronous Response) and exposed the method receiveSelectionViewIndex, to which the responding view index is provided via argument.

The client can retrieve the unique identifier and other information about the selected feature.  (See Retrieving Selected-Feature Information).

This method returns 0 upon success, and returns an error code if either type or attrName is invalid.

 Migration note for v2.5 developers: setSelectSingleFeatureMode corresponds to selectSingleFeature or setSelectSingleFeature, when used synchronously or asynchronously, respectively, with attrName = “Feature Code” and attrValue set to a specific feature code or partial feature code with wild card(s).