Click or drag to resize

SystemOptionSubOptions Property

Returns the sub options of the option.

Namespace:  ABB.Robotics.Controllers.SystemInfoDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public SystemOption[] SubOptions { get; }

Property Value

Type: SystemOption
Examples
This example shows the system options of the current robot system in a listview. The system option names are displayed in the first column and the sub options (if any) in the second column.
private void ShowOptions()
{
  try
  {
    ABB.Robotics.Controllers.SystemInfoDomain.SystemOption[] sysOptions = null;
    sysOptions = ABB.Robotics.Controllers.SystemInfoDomain.SystemInfo.SystemOptions;
    if (sysOptions != null)
    {
      for (int i = 0; i < sysOptions.Length; i++)
      {
        ListViewItem item;
        item = new ListViewItem(sysOptions[i].Name);
        listView1.Items.Add(item);

        //Get all sub options of the option and display them in the second column of the listview
        ABB.Robotics.Controllers.SystemInfoDomain.SystemOption[] subOptions = null;
        subOptions = sysOptions[i].SubOptions;

        if (subOptions != null)
        {
            StringBuilder sb = new StringBuilder();
            for (int j = 0; j < subOptions.Length; j++)
            {
              sb.Append(subOptions[j].Name);
              sb.Append(", ");
            }
            item.SubItems.Add(sb.ToString());
         }
       }
    }
  }
  catch (GeneralException ee)
  {
   // TODO: Add error handling
  }
  catch (System.Exception ee)
  {
   // TODO: Add error handling
  }
}
See Also