ArcObjects Library Reference (Editor) |
|
Provides access to members that snap point locations using a tolerance.
Product Availability
Available with ArcGIS Desktop.
When To Use
The ISnapAgent interface is typically used in two scenarios: creating new custom snap agents and accessing properties of an existing snap agent. Implement this interface when creating a custom snap agent.
Members
|
Name |
Description |
|
Name |
The name of the snap agent shown in the UI. |
|
Snap |
Called by the editor to perform the actual snapping logic. |
CoClasses that implement ISnapAgent
Remarks
All snap agents implement this interface.
Tools that work with snapping typically call the ISnapEnvironment::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.
Create custom snap agents by implementing this interface and register it in the ESRI Snap Agents component category. All snap agents registered in this component category will show up in the Snapping Window. All snap agents should additionally implement IPersistVariant (VB) or IPersistStream(C++). Implementing either IPersistVariant or IPersistStream enables snap agents to persist their state in a map document. These interfaces also have an important role with regards to the editor's snapping window, their implementation helps turn snap agents off and on.
See Also
ISnapEnvironment Interface | IGeometry Interface
.NET Related Topics
Working with the editor snap environment