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


ISnapEnvironment Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IS > ISnapEnvironment Interface
ArcGIS Developer Help

ISnapEnvironment Interface

Provides access to members that manage the snap agents used by the editor. Note: the ISnapEnvironment interface has been superseded by ISnapEnvironment3. Please consider using the more recent version.

Product Availability

Available with ArcGIS Desktop.

When To Use

The ISnapEnvironment interface manages the collection of snap agents,
the snap tolerance, and the snap tolerance units

Members

Name Description
Method AddSnapAgent Adds a new snap agent to the snap environment.
Method ClearSnapAgents Removes all snap agents.
Method RemoveSnapAgent Removes the snap agent at the given index.
Read-only property SnapAgent A snap agent at the given index.
Read-only property SnapAgentCount The number of active snap agents.
Method SnapPoint Attempts to snap the point using the current snap environment.
Read/write property SnapTolerance The snap tolerance, measured in pixels or map units.
Read/write property SnapToleranceUnits The units used for the snap tolerance.

Classes that implement ISnapEnvironment

Classes Description
Editor The Object Editor Extension.

Remarks

The ISnapEnvironment interface is on the Editor CoClass. You can access ISnapEnvironment from any other interface on the Editor CoClass.

[C#]

To use this code to access the ISnapEnvironment interface first get a reference to Iapplication(app) thru the ICommand::OnCreate hook parameter.


  IEditor sEditor;
  sEditor = app.FindExtensionByName("ESRI Object Editor") as IEditor;
  ISnapEnvironment snapEnv = sEditor as ISnapEnvironment;

See Also

IDatasetEdit Interface | IDatasetEditInfo Interface | IEditSketch Interface | IEditTask.Activate Method | IEditor Interface | IEditTask.Deactivate Method | ISnapEnvironment Interface | IEditEvents2 Interface | IEditLayers Interface | IEditEvents Interface | IEditTask.Name Property | Editor Class | Editor Library | IEditTask.OnFinishSketch Method | IEditAttributeProperties Interface | IEditTask.OnDeleteSketch Method | IEditProperties Interface | ISnapAgent Interface | esriSnapToleranceUnits Constants