ViewMngrAPI.getActiveView

 

LPDISPATCH getActiveView()

This method retrieves the ViewAPI object of the currently active view, i.e. the view that is on top of all other views ..  The method is used as shown below.

In VC++, allocated on the heap (assuming vwMngrAPI is a pointer to the ViewMngrAPI):

  1. IViewAPI* vwAPI = new IViewAPI;

  2. vwAPI->m_lpDispatch = vwMngrAPI->getActiveView();

In VC++, on the stack (assuming vwMngrAPI is a pointer to the ViewMngrAPI):

  1. IViewAPI vwAPI;

  2. vwAPI.m_lpDispatch = vwMngrAPI->getActiveView();

In VB (assuming vwMngrAPI is a ViewMngrAPI object):

In the declarations:

Public vwAPI As Object

or

Private vwAPI As Object

Where needed:

Set vwAPI = vwMngrAPI.getActiveView

The client receives an instance of this object shared by other clients, if any.