Table DAT

From TouchDesigner 088 Wiki


The Table DAT lets you hand-edit or create a table of rows and columns of cells, each cell containing a text string. A "table" is one of the two forms of DATs (the other being simply lines of "free-form" text via the Text DAT).

In the Table DAT's viewer you can add rows and columns and type text into any cell of its node viewer. When a Table DAT has its Viewer Active on, right-mouse click on a cell to modify the table's structure, use the <Tab> key to jump to the next cell, and the up/down arrow keys to navigate to adjacent cells.

You can also put strings into table cells using something like op('table1')[2,'select'] = 'yes', or append rows using .appendRow() in python. See also the Script DAT.

The Table DAT can also can load a table from a .txt or .dat file on disk or on the web. Use http:// when specifying a table on the internet. The text will be converted into tab-delimited tables.

PythonIcon.png tableDAT_Class


Edit... button /edit - Clicking this opens a text editor to add/edit/delete text from the DAT.

File /file - The filesystem path and name of the file to load. Accepts .txt and .dat files.

Reload File button /reload - When set to 1, reloads the file into the DAT.

Remove Blank Lines checkbox /removeblank - When enabled, do not convert blank lines into empty rows when loading files.

Exact Dimensions checkbox /dims - When enabled, lets you define the exact number of rows and columns of the Table DAT via the /rows and /cols parameter. When you enable this, it will not destroy any existing rows or columns.

Rows /rows - Defines the number of rows in the table.

Columns /cols - Defines the number of columns in the table.

Legacy Tscript Commands

tabcell and echo commands. In addition, all commands have the -T option that formats the output in a table-format. With -T, a redirect automatically creates a Table DAT. Example:

ls -l -T >nodetable

Appending -T to any command will cause the redirected output to create a Table DAT instead of a Text DAT. Example that creates a 2-row table:

echo -T abc > dat1
echo -T def >> dat1