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

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

IEngineSnapAgent.Snap Method

Fired by the Engine Editor to perform the actual snapping logic.

[Visual Basic .NET]
Public Function Snap ( _
    ByVal geom As IGeometry, _
    ByVal point As IPoint, _
    ByVal Tolerance As Double _
) As Boolean
public bool Snap (
    IGeometry geom,
    IPoint point,
    double Tolerance
  IGeometry* geom,
  IPoint* point,
  double Tolerance
geom [in]

geom is a parameter of type IGeometry* point [in]
point is a parameter of type IPoint* Tolerance [in]
Tolerance is a parameter of type double

Product Availability

Available with ArcGIS Engine.


Each snap agent uniquely implements the Snap method. Although each snap agent's Snap method can be called directly, typically the IEngineSnapEnvironment::SnapPoint method is used to call this function for each loaded snap agent until one of them reports it has modified the passed in point's properties. To facilitate this behavior, each snap agent's Snap method must return a boolean variable indicating whether or not it has modified the passed in points coordinates.

Snapping the passed in point means changing its x,y location properties. Because an IPoint interface pointer is passed into this function ByValue, direct edits of the point's parameters are possible. Resetting the IPoint interface to a different Point object will have no effect after leaving the scope of the function.

See Also

IEngineSnapAgent Interface | IEngineSnapEnvironment Interface