This document is archived and information here might be outdated.  Recommended version.

IEngineSnapEnvironment.SnapPoint Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IE > IEngineSnapEnvironment Interface > IEngineSnapEnvironment.SnapPoint Method
ArcGIS Developer Help

IEngineSnapEnvironment.SnapPoint Method

Attempts to snap the point using the current snap environment.

[Visual Basic .NET]
Public Function SnapPoint ( _
    ByVal point As IPoint _
) As Boolean
public bool SnapPoint (
    IPoint point
HRESULT SnapPoint(
  IPoint* point
point [in]

point is a parameter of type IPoint*

Product Availability

Available with ArcGIS Engine.


SnapPoint passes the required point parameter to each of the added snap agents in the order that these agents were added. The agents attempt, in turn, to find point coordinates that fulfill its snap properties for the incoming point. If a new snap location is found, the relevant snap agent modifies the original point's coordinates to that of the new location. The same point is then returned to SnapPoint. Once a snap agent is found that satisfies the point subsequent snap agents are not tested.

As an example: there may be several feature snap agents present. Each receives a point from the current cursor location, which is passed to the agent via the SnapPoint method. If the conditions for a snap are met, the boolean value of the agent returns TRUE, the point's coordinates are updated based on the active feature snap conditions and the same point is returned to SnapPoint.

See Also

IEngineSnapEnvironment Interface