This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > PublisherControls > ESRI.ArcGIS.PublisherControls > Interfaces > IA > IARCommandInfo Interface > IARCommandInfo.Enabled Property (ArcObjects .NET 10.5 SDK) |
Indicates if the command is enabled.
[Visual Basic .NET] Public ReadOnly Property Enabled As Boolean
[C#] public bool Enabled {get;}
Indicates the enabled state of the specified ARTool command. Check a tools enabled state before setting it as the IARControl::CurrentARTool.
//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);
}
'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