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


IHookActions.DoActionWithName Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Controls)  

IHookActions.DoActionWithName Method

Perform the action on the object using the name.

[Visual Basic .NET]
Public Sub DoActionWithName ( _
    ByVal pUnknown As Object, _
    ByVal Name As String, _
    ByVal Action As esriHookActions _
)
[C#]
public void DoActionWithName (
    object pUnknown,
    string Name,
    esriHookActions Action
);
[C++]
HRESULT DoActionWithName(
  LPUNKNOWN pUnknown,
  BSTR Name,
  esriHookActions Action
);
[C++]

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

Product Availability

Available with ArcGIS Engine.

Description

DoActionWithName performs the specified Action on the specified object with the specified name string in the ActiveView. For example, pass esriHookActionsLabel to label the specified object with the specfied label. Use the ActionSupported method before DoActionWithName 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.

Name is the string used by esriHookActionsLabel and esriHookActionsCallout actions.

Remarks

When passing DoActionWithName 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