Provides access to members that manage the snap agents used by the editor. Note: the ISnapEnvironment interface has been superseded byISnapEnvironment3. Please consider using the more recent version.
Product Availability
When To Use
the snap tolerance, and the snap tolerance units
Members
Description | ||
---|---|---|
AddSnapAgent | Adds a new snap agent to the snap environment. | |
ClearSnapAgents | Removes all snap agents. | |
RemoveSnapAgent | Removes the snap agent at the given index. | |
SnapAgent | A snap agent at the given index. | |
SnapAgentCount | The number of active snap agents. | |
SnapPoint | Attempts to snap the point using the current snap environment. | |
SnapTolerance | The snap tolerance, measured in pixels or map units. | |
SnapToleranceUnits | The units used for the snap tolerance. |
CoClasses that implement ISnapEnvironment
CoClasses and 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.
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 | IEditTask.Name Property | Editor Class | ISnapEnvironment Interface | IEditEvents2 Interface | IEditTask.Deactivate Method | IEditAttributeProperties Interface | IEditor Interface | IEditSketch Interface | IEditTask.OnFinishSketch Method | IEditProperties Interface | IEditLayers Interface | IEditTask.Activate Method | IEditTask.OnDeleteSketch Method | IEditEvents Interface | ISnapAgent Interface | esriSnapToleranceUnits Constants