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


IFeatureSnap.Snap Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

IFeatureSnap.Snap Method

Snap the feature based on the arguments.

[Visual Basic .NET]
Public Function Snap ( _
    ByVal point As IPoint, _
    ByVal tolerance As Double _
) As Boolean
[C#]
public bool Snap (
    IPoint point,
    double tolerance
);
[C++]
HRESULT Snap(
  IPoint* point,
  double tolerance,
  VARIANT_BOOL* snapped
);
[C++]

Parameters point [in]
point is a parameter of type IPoint tolerance [in] tolerance is a parameter of type double snapped [out, retval] snapped is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The Snap method in the IFeatureSnap interface is not implemented by the ComplexJunctionFeature class that the custom feature must aggregate. ArcMap will call this method on all complex junctions within snapping distance of the cursor if custom feature snapping is selected in the Snapping dialog box.


The custom feature is responsible for returning a Boolean value indicating whether or not the cursor can snap to one of the connection points. If the cursor can snap (the IPoint is within the tolerance distance of a connection point), then the inbound IPoint is modified to match the location of the connection point.

 

It is recommended that developers do not use Complex Junctions in their data modeling solutions.  Developers can leverage existing Geodatabase components in order to implement partial functionality, such as IFeatureClassExtension.

 

See Also

IFeatureSnap Interface | ISnapEnvironment Interface