ArcObjects Library Reference  (Carto)    

IActiveView.ExtentStack Property

The extent stack.

[Visual Basic 6.0]
Property ExtentStack As IExtentStack
[Visual Basic .NET]
Public ReadOnly Property ExtentStack As IExtentStack
[C#]
public IExtentStack ExtentStack {get;}
[Java]
public  getExtentStack (
    IExtentStack ExtentStack
)
[C++]
HRESULT get_ExtentStack(
  IExtentStack** ExtentStack
);
[C++]

Parameters

ExtentStack [out, retval]

  ExtentStack is a parameter of type IExtentStack

Product Availability

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

Remarks

Returns a reference to the active view's extent stack.  Each active view has an extent stack which remembers previous extents so that users can 'go back' and then 'go forward' to previous extents.

[Visual Basic 6.0]

The following simple VBA script attempts to set the active view's extent to the previous extent held in the extent stack.  Note that IMxDocument::ActiveView is used so that the script works with ArcMap's current view - data or layout.  IExtentStack::Undo and Redo automatically call refresh.

Sub PreviousExtent()
    Dim pMxDocument As IMxDocument
    Dim pPageLayout As IPageLayout
    Dim pExtentStack As IExtentStack
    Set pMxDocument = Application.Document
    Set pExtentStack = pMxDocument.ActiveView.ExtentStack
    If pExtentStack.CanUndo Then pExtentStack.Undo
End Sub

See Also

IActiveView Interface

 


Feedback Send feedback on this page