*tableaddcolumn
Adds a column of data to the right of a table.
Syntax
*tableaddcolumn name data_type column_label string_array number_of_strings
Type
HyperMesh Tcl Modify
Description
Adds a column of data to the right of 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.
Example
To add a column of type integer and label INTEGER to “table1” which has 7 rows:
*createstringarray 7 1 2 3 4 5 6 7
*tableaddcolumn "table1" int INTEGER 1 7
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