Hi Giselher,
I think you could try the X-Function: addtool_curve_stats
//Execute XF to create gadget
addtool_curve_stats;
//Declare LT gadget variable
gadget gg = rect;
//Expand ROI to full range
gg.expand();
//Define a tree variable
tree mytr;
//Output result to the tree variable mytr
gg.getresult(mytr);
//view the tree variable
mytr.=;
For more info, please refer to these pages:
https://www.originlab.com/doc/X-Function/ref/addtool_curve_stats
https://www.originlab.com/doc/LabTalk/ref/Gadget-obj
For some X-Functions, there is Generate Script context menu to generate X-Function Script. Let us take the addtool_curve_stats X-Function as an example:
1. Select Gadgets: Statistics: Open dialog from menu
2. Set the options in the dialog as usual
3. Click the triangle button at the upper right corner
4. Select Generate Script from the context menu, then the Script Window will pop up with the script
Hope it helps.
Regards,
Yuki
OriginLab