2.2.3.14 getresults

Brief Information

Load results from report sheet into a tree

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. getresults;

2. getresults tr:=tree;

3. getresults tr:=tree iw:=[Book1]Sheet2! escstr:=0;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
LabTalk Tree to Receive Results tr

Output

TreeNode

ResultsTree

The result tree
See more details in Description table

Worksheet to Obtain Results Tree iw

Input

Worksheet

<active>

The specified worksheet to get the result.

Translate Internal Escape Strings escstr

Input

int

1

Whether to translate the escaped operation strings in the returned tree or not.

Description

This function is used to get the result tree.

Examples

This examples shows how to get result values from result tree after doing a nonlinear curve fit.

// Import an Origin Sample file
string fpath$ = "Samples\Curve Fitting\Gaussian.dat";
string fname$ = SYSTEM.PATH.PROGRAM$ + fpath$;
impasc;
// Run a Gauss fit of the data and create a Report sheet
nlbegin (1,2) gauss;
nlfit;
nlend 1 1;
// An automatically-created string variable, __REPORT$, 
// holds the name of the last Report sheet created:
string strLastReport$ = __REPORT$;
// This is the X-Function which gets the Report into a tree
getresults tr:=MyResults iw:=%(strLastReport$);
// So now we can access those results
ty Variable\tValue\tError;
separator 3;
ty y0\t$(MyResults.Parameters.y0.Value)\t$(MyResults.Parameters.y0.Error);
ty xc\t$(MyResults.Parameters.xc.Value)\t$(MyResults.Parameters.xc.Error);
ty w\t$(MyResults.Parameters.w.Value)\t$(MyResults.Parameters.w.Error);
ty A\t$(MyResults.Parameters.A.Value)\t$(MyResults.Parameters.A.Error);

//Dump MyResults tree
MyResults.=;

//Dump one node under the tree
MyResults.Parameters.y0.=;

Keywords:analysis