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


IHookActions.DoAction Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IH > IHookActions Interface > IHookActions.DoAction Method
ArcGIS Developer Help

IHookActions.DoAction Method

Perform the action on the object.

[Visual Basic .NET]
Public Sub DoAction ( _
    ByVal pUnknown As Object, _
    ByVal Action As esriHookActions _
)
[C#]
public void DoAction (
    object pUnknown,
    esriHookActions Action
);
[C++]
HRESULT DoAction(
  LPUNKNOWN pUnknown,
  esriHookActions Action
);
[C++]
Parameters
pUnknown [in]

pUnknown is a parameter of type IUnknown Action [in]
Action is a parameter of type esriHookActions

Product Availability

Available with ArcGIS Engine.

Description

DoAction performs the specified Action on the specified object in the ActiveView. For example, pass esriHookActionsZoom to zoom to the extent of the specified object. Use the ActionSupported method before DoAction is ensure the specified Action is supported.

pUnknown must be an object implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry should not be empty.

Remarks

When passing DoAction an object implementing IPoint and esriHookActionsZoom, if the width of the specified geometry is zero, the display will be zoomed to 1/20th of the width of the full extent of the data. If the height of the current visible extent is less than 1/20th of the height of the full extent of the data, the current visible extent is used instead.

See Also

IHookActions Interface