ArcObjects Library Reference (Controls)  

IEngineSnapAgent Interface

Provides access to members that snap point locations using a tolerance.

Product Availability

Available with ArcGIS Engine.

Description

The IEngineSnapAgent interface is typically used when creating new custom snap agents and when accessing properties of an existing snap agent. Implement this interface when creating a custom snap agent.

Tools that work with snapping typically call the IEngineSnapEnvironment::SnapPoint method every time the mouse moves. SnapPoint in turn calls each snap agents Snap method in succession until one of them returns true. True means a new point has been found that meets the qualifications set within a particular snap agents Snap method. For example, is the passed in point representing the sketch tools current location, within 10 meters of a parcel vertex. The first snap agent to return true, modifies the passed in points x,y location to reflect that of the new snap point location and no other snap agents are called.

Members

Description
Read-only property Name The name of the engine snap agent.
Method Snap Fired by the Engine Editor to perform the actual snapping logic.

CoClasses that implement IEngineSnapAgent

CoClasses and Classes Description
EngineFeatureSnap An engine snap agent that snaps to features in a specific feature class.

.NET Samples

Managing snap agents (Code Files: SnapEditorForm)

.NET Related Topics

How to work with the snap environment