
Contents |
Get and set tree stored in operation object
This X-Function not designed for Auto GetN Dialog.
Minimum Origin Version Required: 8.1 SR2
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| ir |
Input Range | | Specifies the range that contains operation. This X-Function gets treenodes from or triggers the recalculation using settings specified in treenodes in this range. | |
| tr |
Input/Output TreeNode | | Specifies the tree name to get or set operation settings. | |
| op |
Input int | | Specified the operation performed on the tree node
Option list:
| |
| result |
Output int | | Shows whether the execution succeeds or not. If result = 1, execution succeeds. If result = 0 or -1, execution fails. |
After getting results from an operation, which allows recalculation, it is usually wanted to access to the operation settings and change some of them to trigger recalculation programmatically. This X-Function allows you to get the operation settings from input object and store them into a user-defined tree. You can also reset the settings and execute the operation again. It is especially useful when you load an Analysis Template and want to change some settings for new data analysis.
The following scripts just show you a brief example to get and reset smooth settings by using op_change.
newbook; col(1)={1:32}; col(2)=col(1)+rnd(); col(3)=col(1)+3*rnd(); worksheet -s 2 0; smooth -r 2; op_change ir:=col(4) tr:=mytree; //get smooth settings to mytree mytree.xfGetN.iy.Range1.Y$="[%H]Sheet1!C"; mytree.xfGetN.npts=10; op_change ir:=col(4) tr:=mytree op:=run; //recalculate smoothing by using col(3) as input and npts=10