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


IActiveView.Clear Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IActiveView.Clear Method

Empties the view contents.

[Visual Basic .NET]
Public Sub Clear ( _
)
[C#]
public void Clear (
);
[C++]
HRESULT Clear(
void
);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The Map object's implementation of Clear deletes all of the Layers in the Map (IMap::ClearLayers ), removes all MapSurrounds (IMap::ClearSurrounds ), removes all bookmarks (IMapBookMarks::RemoveAllBookMarks), and resets the extent stack.  Clear does not refresh the active view however.

Clear on PageLayout deletes all Elements, including MapFrames which hold a Map, resets the extent stack, and a new Map is created - there must always be a focus map.

See Also

IActiveView Interface