*tableinsertcolumn
Inserts a column of data into a table.
Syntax
*tableinsertcolumn name data_type column_label string_array number_of_strings column_index
Type
HyperMesh Tcl Modify
Description
Inserts a column of data into a table.
Inputs
- name
- The name of the table to update.
- data_type
- The data type of the column. See *tablecreate for valid values.
- column_label
- The label of the column.
- string_array
- The ID of the string array that contains the column data to add. The string array is created using the *createstringarray command. This should always be set to 1.
- number_of_strings
- Integer indicating the size (number of strings) in the string array created using *createstringarray. This must equal the number of rows in the table.
- column_index
- The index of the column to insert. Tables are indexed starting from 1 (1 to n columns).
Example
To insert column 4 of type integer and label INTEGERS to “table1” which has 7 rows:
*createstringarray 7 1 2 3 4 5 6 7
*tableinsertcolumn "table1" int INTEGER 1 7 4
Errors
Incorrect usage results in a Tcl error. To
detect errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
11.0.101