ArcObjects Library Reference  (PublisherControls)    

IARCommandInfo.Enabled Property

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;}

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 6.0]
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
[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

 


Feedback Send feedback on this page