Set Integer: Spreadsheet View

Sets the control contained in a cell to the specified integer value. The control must be of the types EditInt, Checkbox, or ListBox.

Set Integer Inputs

Syntax: SI[Column][Row][Int]

Parameter Description
Column The column letter of the cell value to set (A to Z).

Row

The row number of the cell value to set. The row number must contain a three-digit number (000 to 399).

Int The integer value to set.

Set Integer Outputs

Returns a status code. The status codes are:

Status Codes Description
1

The command was executed successfully.

0

Unrecognized command.

-1

The cell ID is invalid, or was not an integer.

-2

The command could not be executed, or the specified integer value is outside of the control's valid range. For example, the specified cell may not contain a control of the valid type.

-6

User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Example: Change the Value of an EditInt Control

The command to set an EditInt control in cell A2 to the integer value 8 is: SIA0028

  1. Assume cell A2 is populated as follows:

    A2 = EditInt(0,10)

    A2 currently contains the value 3.  The spreadsheet looks like this:

  2. We would like to change the value in A2 to 8 using the Set Integer Native Mode command; issue the command SIA0028 as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The EditInt control has been successfully changed from 3 to 8 within the spreadsheet:

Example: Toggle the State of a CheckBox Control

You can enable or disable a CheckBox control using the Set Integer command by sending a value of 1 (enable) or 0 (disable) to the cell that contains the check box.

  1. Assume cells B2, D2 and E2 are populated as follows:

    • B2 = CheckBox("Draw circle")
    • D2 = 'Check box integer value =
    • E2 = $B$2

    The check box is currently cleared, as shown:

    Note: Cell E2 is simply reporting the integer value of the CheckBox control.
  2. To select this check box using the Set Integer Native Mode command, issue the command SIB0021, as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The check box is now selected:

    Cell E2 changed from 0 to 1 to reflect the new integer value of the CheckBox control.

Example: Change the Selection within a ListBox Control

Each item within a ListBox control has an integer value (zero-based) assigned to it. You can "choose" a different value from the list by using the Set Integer Native Mode command to assign a different value to the cell that contains the ListBox control.

  1. Assume cells B2, C2 and D2 are populated as follows:

    • B2 = ListBox("Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet")
    • C2 = '    Integer List Value =
    • D2 = $B$2

    The ListBox control is currently set to Yellow; this corresponds with an integer value of 2, as shown in the following spreadsheet:

    Note: Cell D2 is simply reporting the integer value of cell B2.
  2. To change the current list selection to Blue using the Set Integer Native Mode command, issue the command SIB0024, as shown in the following telnet client window:

    The In-Sight sensor responds with 1, indicating that the command was successfully executed. The list selection has been changed from Yellow to Blue within the spreadsheet:

    Cell D2 changed from 2 to 4 to reflect the new integer value of the ListBox control.