ArcObjects Library Reference (Controls)  

IEngineFeatureSnapAgent Interface

Provides access to members that control an engine feature snap agent's properties.

Product Availability

Available with ArcGIS Engine.

When To Use

Use this interface to set the behavior of new engine feature snap agents. Engine Feature snap agents control which features the engine's editor attempts to snap to. For example, you may want the editor to automatically snap to the vertex of all buildings. To implement this you would create a new EngineFeatureSnap and specify the FeatureClass to be 'Buildings' and the HitType to be esriGeometryPartVertex . New feature snap agents have to be added to the editor's snap environment with IEngineSnapEnvironment::AddSnapAgent before they can be used unless you want to call Snap yourself.

The last member, FeatureCache , is very rarely used. Use it when applying a snapping constraint on top of an existing placement constraint. For example, you may want to create a constraint that places a point exactly 100 feet away but additionally honors the snap environment that states, snap the point to a feature if it is within the search tolerance. Thus the point has to be 100 feet away no matter what and if this location is within snap tolerance of a feature, place the point exactly on the feature. The basic idea is create the distance constraint inside a sketch tool and then reuse the FeatureCache associated with the particular FeatureSnapAgent so you don't have to manage a new one.

Members

Description
Read-only property FeatureCache The FeatureCache associated with the engine feature snap agent.
Read/write property FeatureClass The featureclass the feature snap agent snaps to.
Read/write property HitType The part of a geometry the engine feature snap agent snaps to.
Read-only property Name The name of the engine snap agent.
Method Snap Fired by the Engine Editor to perform the actual snapping logic.

Inherited Interfaces

Interfaces Description
IEngineSnapAgent Provides access to members that snap point locations using a tolerance.

CoClasses that implement IEngineFeatureSnapAgent

CoClasses and Classes Description
EngineFeatureSnap An engine snap agent that snaps to features in a specific feature class.

See Also

IEngineSnapAgent Interface