Indicates if the command is enabled.
[Visual Basic 6.0] Property Enabled As Boolean
[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);
}
Sub SetCurrentTool()
'Get the IARCommandInfo interface
Dim pARCommandInfo As ARCommandInfo
Set pARCommandInfo = ArcReaderControl1.ARCommandInfo(esriARToolMapHyperlink)
'Check the tool is enabled
If pARCommandInfo.Enabled = True Then
'Set the current tool
ArcReaderControl1.CurrentARTool = esriARToolMapHyperlink
'Display the tools message on a label
lblMessage.Caption = pARCommandInfo.Message
End If
End Sub
'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