This document is archived and information here might be outdated. Recommended version. |
Provides access to the editing specific snapping environment.
Name | Description | |
---|---|---|
SnapToTopologyNodes | Indicates whether the topology nodes will be added to the snapping cache. It is used when not using classic snapping. |
CoClasses and Classes | Description |
---|---|
EditorSnapping | Controls the editing specific snapping environment. |
Use IEditor::FindExtension to access the IEditorSnapping interface, which lets you turn on snapping for topology nodes. See the code below for examples of how to get a reference to EditorSnapping.
public void GetEditorSnappingByCLSID()
{
//If your project is an Add-In you are given the Application. Otherwise you can get the app from the
//hook parameter.
UID editorUID=new UIDClass();
editorUID.Value="esriEditor.Editor";
_Editor=ArcMap.Application.FindExtensionByCLSID(editorUID) as IEditor;
UID editSnapUid=new UIDClass();
editSnapUid="esriEditorExt.EditorSnapping";
IEditorSnapping _EditorSnapping= editor.FindExtension(editSnapUid) as IEditorSnapping
}
Public Sub GetEditorSnappingByCLSID()
Dim eUID As UID=New UIDClass()
eUID.Value="esriEditor.Editor"
'This Code would be used in an Add-in, if the project is not an add-in the Application object can be 'obtained from the hook parameter.
_Editor=TryCast(My.ArcMap.Application.FindExtensionByCLSID(eUID), IEditor)
Dim chipUID As UID=New UIDClass()
chipUID.Value="esriEditorExt.EditorSnapping"
Dim _SelectionChip As IEditorSnapping=TryCast(_Editor.FindExtension(chipUID), IEditorSnapping)
End Sub