How to save and close combined tables into a file?Hello All,
Please see the following bit of script. I am trying close and save the estimates and errors table into files. However, for some reason the commands do not do anything and adter running the whole script I still have these two tables open. What Am I doing wrong?
Thanks
_xx = obj << Xpath("//OutlineBox[@helpKey='Nonlinear Solution']");
//only 2 groups so only 2 are found; each contains two sub tables
fit_dt = (_xx[1]<<FIND>= 0, i--,
If( Contains( DontClose, Data Table( i ) << get name ),
Continue(),
Close( Data Table( i ), "No Save" )
)
);
dt=Current data table ("NonLin Fit Errors");
dt<<SAVE></SAVE></FIND>Re: How to save and close combined tables into a file?Things to check:
There might be a message in the log.
The loop is setup to count down to zero. It should probably stop at one. (That's related to the message that might be in the log that might be stopping the script.) If you think the script is stopping without warning, add a print or show statement here and there; within the loop you might want
<SPAN class="token function">show( Data Table</SPAN><SPAN class="token punctuation">(</SPAN> i <SPAN class="token punctuation">)</SPAN> <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> get name );</SPAN>
just to know it is working as expected.
Alternate approach:
You already have the variables for the tables you want to save; you can use them directly.
fit_dt<<SAVE></SAVE>close(fit_dt);
and avoid current data table(). And now I see you are using current data table with an argument; perhaps that should just be data table("xxx") instead. I'm pretty sure that's related as well.