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


IARCommandInfo.Enabled Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > PublisherControls > ESRI.ArcGIS.PublisherControls > Interfaces > IA > IARCommandInfo Interface > IARCommandInfo.Enabled Property
ArcGIS Developer Help

IARCommandInfo.Enabled Property

Indicates if the command is enabled.

[Visual Basic .NET]
Public ReadOnly Property Enabled As Boolean
[C#]
public bool Enabled {get;}

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

Indicates the enabled state of the specified ARTool command. Check a tools enabled state before setting it as the IARControl::CurrentARTool.

[C#]
//Get the IARCommandInfo interface
IARCommandInfo arCommandInfo = axArcReaderControl1.get_ARCommandInfo(esriARTool.esriARToolMapHyperlink);
//Check the tool is enabled
if (arCommandInfo.Enabled == true)
{
    //Set the current tool
    axArcReaderControl1.CurrentARTool = esriARTool.esriARToolMapHyperlink;
    //Display the tools message on a label
    System.Windows.Forms.MessageBox.Show(arCommandInfo.Message);
}

[Visual Basic .NET]
'Get the IARCommandInfo interface
Dim pARCommandInfo As ARCommandInfo
pARCommandInfo = AxArcReaderControl1.get_ARCommandInfo(esriARTool.esriARToolMapHyperlink)

'Check the tool is enabled
If pARCommandInfo.Enabled = True Then
  'Set the current tool
  AxArcReaderControl1.CurrentARTool = esriARTool.esriARToolMapHyperlink
  'Display the tools message on a label
  System.Windows.Forms.MessageBox.Show(pARCommandInfo.Message)
End If

See Also

IARCommandInfo Interface