Find Nearest Selected Feature

Created:10/10/1999
Description:

Using this tool, you can select from the current selection set, the feature closest to the mouse-click and within the search tolerance (8 pixels). This feature is then flashed. This tool selects points before lines, and lines before areas. This can be useful when selecting points that are inside polygons, or points lying on top of lines.

How to use:
  1. In the Customize dialog, click on 'Add from file' and select this sample's dll.
  2. Under the Commands tab, select the 'Nearest Selected' command from the Developer Samples category, and drag it on to a toolbar. Dismiss the Customize dialog.
  3. Click on the tool, and start using it.

Application:
ArcMap

Difficulty: Advanced


Visual Basic
File Description
clsNearestSelect.cls Class file that implements the COM Server.
frmResources.frm VB Form file holding resources used within project.
NearestSelectedTool.dll Compiled project DLL.
NearestSelectTool.vbp Visual Basic project file.


Key CoClasses: Envelope, Map, Feature, Point
Key Interfaces: IProximityOperator, ISimpleFillSymbol, ISimpleLineSymbol, ISimpleMarkerSymbol, ISymbol