Read DAT content (paginated)
get_dat_contentRead a TouchDesigner DAT file with pagination, returning a sliced page of rows, total counts, and an optional stable header preview for large tables.
Instructions
Read a Text or Table DAT with pagination so a large table cannot flood context. Returns total row/col counts, a header (table DATs), a sliced page (offset/limit), an optional stable head preview (preview_rows), and a row_range only on a partial read. Table DATs are split on tabs/newlines client-side — that split is lossy if a cell embeds a literal tab or newline (probe live before relying on it). Use edit_dat_content/set_dat_content to write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows/lines to return. Capped so a large table never floods context. | |
| offset | No | First data-row index to return (0-based). For a table DAT it indexes data rows (after the header when include_header is true); for a non-table Text DAT it indexes lines. | |
| dat_path | Yes | Absolute path to the Text or Table DAT to read (e.g. '/project1/table1'). | |
| preview_rows | No | If > 0, ALSO return the first N rows regardless of offset — a stable head preview alongside a deep page. 0 disables the separate preview. | |
| include_header | No | For table DATs, treat row 0 as a header: return it in `header` and make offset/limit index the data rows after it. Set false to treat every row as data. |