NetLinx Programming
116
TPI-PRO-DVI - Instruction Manual
Listbox Commands
Listboxes provide flexibility to remote pages once constrained by physical display areas. Both static and dynamic tables can display
multiple devices and items when used with proper navigation tools. List Box commands can be used in conjunction with the
application TPDesign4 to create both static and dynamic commands.
Any data f ield (including primary data) may be enclosed in double quotes so that commas within that data field will not be
interpreted as delimiters. Within the double quotes in such a field, the backslash (\) is treated as an escape character so that double
quote literals can still be used within the field. When a backslash is encountered, it is discarded and the following character is
treated as a literal. This means that if a backslash is part of the data field, it needs to be escaped with a preceding backlash as well.
When a column or row number is required as a field in any command, note that the numbering begins at 1, not 0 (i.e. the first
column is column 1 and the first row is row 1).
There are no hard limits enforced for the number of list boxes and such list box parameters as list address and column count. The
range is determined by available memory, which is affected by things like how many lists are defined and how many items will be
added for each list.
Data List Commands
The TPI supports the following Data List Commands.
Data List Commands
^LDN Creates a new data list. It is up to the program to make sure the list address and name are unique.
Syntax:
"'^LDN-<list port>,<list address>,<column count>,<list name>'"
Variables:
• list port = 1-100. Port where data resides
• list address = address where data resides
• column count = the number of data columns (includes hidden columns)
• list name = User specified name for the data list
Example:
SEND_COMMAND Device, "'^LDN-5,1,4,my songs'"
Creates a data list of 4 columns named "my songs" and places it at port 5, address 1.
^LDA Adds a new row to an existing data list. Primary data is required.
Syntax:
SEND_COMMAND <DEV>,"'^LDA-<list address>,<uniflag>,<primary data>,<data2>…'"
Variables:
• list address = address where data resides
• uniflag = indicates unicode; 0 - No unicode, 1 - Uses unicode
• primary data = the "key" data column. The information in this column provides each row with its uniqueness.
• data2 = variable, column data information. The number of data fields is limited only to the number of columns in the data list.
Example:
SEND_COMMAND Device,"'^LDA-1,0,Entry5,Meatloaf,Best of,Anything for Lunch'"
Adds a text row to the data list located at address 1. The primary data is set as Entry5. Meatloaf, Best of, and Anything for Love are
all cells within the new row.
Example (unicode):
SEND_COMMAND Device,"'^LDA-1,1,0045006E0074007200790035,004D006500610074006C006F00610061,
00420065007300740020006F0066,0041006E0079007400680069006E006700200066006F00720020004C006F00760065'"
Adds a unicode text row to the data list located at address 1.
The primary data is set as Entry5.
Meatloaf, Best of, and Anything for Lunch are all cells within the new row.
^LDR Removes a row from an existing data list
Syntax:
SEND_COMMAND <DEV>,"'^LDR-<list address>,<uniflag>,<primary data>'"
Variables:
• list address = address where data resides
• uniflag = indicates unicode; 0 - No unicode, 1 - Uses unicode
• primary data = the "key" data column. The information in this column provides each row with its uniqueness.
Example:
SEND_COMMAND Device,"'^LDR-1,0,Entry5'"
Removes the text row with primary data Entry5 from an existing data list at address 1.
^LDC Clears all rows in a given list
Syntax:
"'^LDC-<list address>'"
Variables:
• list address = address where data resides
Example:
SEND_COMMAND Device, "'^LDC-1'"
Clears all rows in data list located at address 1.