This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IH > IHookActions Interface > IHookActions.DoAction Method (ArcObjects .NET 10.4 SDK) |
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 LPUNKNOWN Action [in]
Action is a parameter of type esriHookActions
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.
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.