From our Labtalk scripting guide (https://www.originlab.com/doc/LabTalk/guide):
Worksheet
// Here we add two trees to the active sheet
wks.tree.add(Input);
// Dynamically create a branch and value
wks.tree.input.Min=0;
// Add another value
wks.tree.input.max=1;
// Add second tree
wks.tree.add(Output);
// and two more values
wks.tree.output.min=-100;
wks.tree.output.max=100;
// Now dump the tree
wks.tree.=;
// or access it
ty Input $(wks.tree.input.min)to $(wks.tree.input.max);
ty Output $(wks.tree.output.min)to $(wks.tree.output.max);
// Access a sheet-level tree using a range
range rs =[Book7]Sheet2!;
rs!wks.tree.=;
Column
// Create a COLUMN tree
wks.col2.tree.add(Batch);
// Add a branch
wks.col2.tree.batch.addsection(Mix);
// and two values in the branch
wks.col2.tree.batch.mix.ratio$="20:15:2";
wks.col2.tree.batch.mix.BatchNo=113210;
// Add branch dynamically and add values
wks.col2.tree.batch.Line.No=7;
wks.col2.tree.batch.Line.Date$=3/15/2010;
// Dump the tree to the Script Window
wks.col2.tree.=;
// Or access the tree
batch =wks.col2.tree.batch.mix.batchno;
string strDate$=wks.col2.tree.batch.Line.Date$;
ty Batch $(batch)made on %(strDate$)[$(date(%(strDate$)))];
This should give you enough to work with.
Thanks,
Chris Drozdowski
Originlab Technical Support