Attempts to snap the specified point. This is used for tool snapping.
[Visual Basic .NET] Public Function Snap ( _ ByVal point As IPoint _ ) As ISnappingResult
[C#] public ISnappingResult Snap ( IPoint point );
[C++]
HRESULT Snap(
IPoint* point,
ISnappingResult** snappingResult
);
[C++]Parameters
point [in]point is a parameter of type IPoint
snappingResult [out, retval]snappingResult is a parameter of type ISnappingResult
Product Availability
Remarks
Snap is the mechanism by which a test point (usually the cursor location) is evaluated against the snapping environment to determine whether any of the snapping criteria have been met. This information is returned in the form of a snap result. If the snapping criteria are not met, a null snap result is returned. If a valid snap location was determined, the snap result defines the snap location along with information about which snapping type was satisfied.
Evaluating Snap candidates
The snapping
environment honors the following layer settings:
- Layer visibility, including scale suppression
- Definition queries
- SQL queries
Only features which match the criteria specified by these
settings are evaluated against the snap candidate.
In addition, only those snapping types specified on the snapping
environment are evaluated. These are evaluated in a specific
order. This snapping type order is fixed. It is
important to note that layer order is secondary when a snap
candidate is considered. This means that the point snapping type is
evaluated against all layers before any subsequent snapping types
are enabled. The closest snap result for a given snapping
type is always returned, regardless if other valid snap results
were identified.
Snapping Type Priority
- Point
- Intersection
- Endpoint
- Vertex
- Midpoint
- Tangent
- Edge