com.esri.arcgis.systemUI
Interface ICommandHost

All Superinterfaces:
Serializable
All Known Implementing Classes:
CommandHost, ToolHost

public interface ICommandHost
extends Serializable

Provides access to the ICommandHost Interface.

Description

The ICommandHost interface is used when developing with the C++ API. C++ developers are unable to create new COM objects, so the CommandHost and ToolHost objects can be used to create custom commands and tools as follows:

Product Availability

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


Method Summary
 void setCommand(Object commandInstance)
          The SetCommand method is used to bind a command instance to its host.
 

Method Detail

setCommand

void setCommand(Object commandInstance)
                throws IOException,
                       AutomationException
The SetCommand method is used to bind a command instance to its host.

Description

The SetCommand method is used when developing with the C++ API, and is called by the AoToolbarAddCommand and AoToolbarAddTool functions. It associates a custom Command/Tool with an instance of the CommandHost/ToolHost. Whenever an ICommand/ITool method on the CommandHost/ToolHost gets called it uses the pointer to forward the call to the custom Command/Tool.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
commandInstance - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.