A DataTable can be used to store custom data in a table like a data base.

Create a Data Table

To add a Data Table within the pool, click on the small (+) or a secondary click in the empty space of the pool.

Setup the Data Table

If the Data Table object is selected in the pool tree, it´s possible to define the table size within the Inspector.

Open the Data Table View / Set values manually

A secondary click on the Data Table object within the pool -> “Open Data Table View”

Within the viewer its possible to edit or add values for a single entry by a double click on it.

Use Scripting to work with the Data Table

To get access to the Data Table, check the unique ID of the object within the Inspector. See here.

Within all script possibilitys within Stage Precision, the Data Table can be used as followed:

DataTable1
to access the object.

DataTable1.clear()
empty the complete table.

DataTable1.get(column, row)
get a single entry value. Column and row needs to be defined as integer.

DataTable1.getAsFloat(column, row)
get a single entry value as float. Column and row needs to be defined as integer.

DataTable1.getAsInt(column, row)
get a single entry value as integer. Column and row needs to be defined as integer.

DataTable1.getAsString(column, row)
get a single entry value as string. Column and row needs to be defined as integer.

DataTable1.getColumn(column)
get all entries from the specific column as one array. Column needs to be defined as integer.

DataTable1.getRow(row)
get all entries from the specific row as one array. Row needs to be defined as integer.

DataTable1.importXLSX("file path", "worksheetname", resize)
import a *.XLSX file to write the table. File path and worksheetname needs to be defined as string, resize needs to be 0 for false or 1 for true.

DataTable1.set(value, column, row)
set a single entry value. The value needs to be defined. Column and row needs to be defined as integer.

DataTable1.setColumn(value, column)
set all entries for the specific column. Value needs to be an array. Column needs to be defined as integer.

DataTable1.setRow(value, row)
set all entries for the specific row. Value needs to be an array. Row needs to be defined as integer.