ArcObjects Library Reference (Controls) |
|
IPointSnapper.ClearCache Method
Clears the underlying snapping cache.
[Visual Basic .NET]
Public Sub ClearCache ( _
)
[C#]
public void ClearCache (
);
[C++]
HRESULT ClearCache(
void
);
Product Availability
Available with ArcGIS Engine.
Remarks
While Snapping is enabled and calls to IPointSnapper.Snap are being made, a cache of the visible features is being actively maintained.
The cache is cleared in a number of instances for you; as a developer you do not need to account for these situations. The following list describes the cases when ClearCache is called.
- A layer is added, moved, or deleted from the table of contents.
- The scale suppression of a layer is changed.
- The visibility of a layer is changed.
- A definition query on a layer is changed.
- A SQL query on a layer is changed.
- A layer’s data source is changed.
- A feature is created, updated, or deleted
- The extent of the map changes.
- The active data frame changes.
- The active view changes (e.g. focus changes from main map window to a viewer window or you switch from data view to layout view in ArcMap)
- The Snapping tolerance (ISnappingEnvironment.Tolerance) is updated.
- Intersection snapping is turned on or off.
- Text Snapping is enabled or disabled.
- CachedShapes, UpdateCachedShapes, or RemoveCachedShapes is called.
- ExcludeIMSLayers property is changed.
When any of the following events are fired, the snapping cache is cleared.
- IHookHelperEvents.OnHookUpdated
- IActiveViewEvents.ContentsChanged
- IActiveViewEvents.FocusMapChanged
- IObjectClassEvents.OnChange
- IObjectClassEvents.OnCreate
- IObjectClassEvents.OnDelete
There is no method to build the cache explicitly; this is handled internally when a client issues a call to IPointSnapper.Snap, at which time it is determined whether the cache needs to be rebuilt.
See Also
IPointSnapper Interface