IGraphicSnapEnvironment Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IG > IGraphicSnapEnvironment Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IGraphicSnapEnvironment Interface

Provides access to members that control the Collection of snap agents used for snapping graphics.

Product Availability

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

Members

Name Description
Method AddSnapAgent Add a new snap agent to the environment.
Method ClearSnapAgents Remove all snap agents.
Method DeleteSnapAgent Remove specified snap agent from the environment.
Read-only property SnapAgent The snap agent at the specified index. The index argument is zero based.
Read-only property SnapAgentCount The number of snap agents.
Read/write property SnapAgentOrder An array of IDs indicating how agents should be ordered.
Method SnapShape Snap the shape using the agents in the environment.
Read/write property SnapTolerance The snap tolerance in page units.

CoClasses that implement IGraphicSnapEnvironment

CoClasses and Classes Description
GraphicSnapEnvironment Collection of Snap Agents used to snap a graphic point.
PageLayout Page Layout class contains maps and map surrounds.

Remarks

Use the IGraphicSnapEnvironment interface to manage the snap agents of the Pagelayout.

Methods are provided to count, add, delete and clear (delete all) the snap agents. This interface also provides access to the SnapTolerance.

Graphics are snapped into place by calling SnapShape. SnapShape in turn calls IGraphicSnap::SnapX and IGraphicSnap::SnapY on each active snap agent (in the order specified by IGraphicSnapEnvironment::SnapAgentOrder) until one of the snap agents returns True. SnapX and SnapY are separate calls because some agents, such as guides, may only act in one direction.

See also IGraphicSnap and IPageLayoutSnap.