This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IS > ISnapEnvironment Interface > ISnapEnvironment.SnapPoint Method (ArcObjects .NET 10.4 SDK) |
Attempts to snap the point using the current snap environment.
[Visual Basic .NET] Public Function SnapPoint ( _ ByVal point As IPoint _ ) As Boolean
[C#] public bool SnapPoint ( IPoint point );
As an example: there may be several FeatureSnap 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 FeatureSnap's conditions and the same point is returned to SnapPoint. In the Editor, the InvertAgent location is always set equal to this point. Thus, when snapping conditions are met, the InvertAgent (blue dot) is passed the point with altered coordinates, and the corresponding location shift is manifested as a "snap".