Oliver Reimer
Germany
1 Posts |
Posted - 06/28/2016 : 6:12:29 PM
|
OriginPro 2016G (64bit) and Service Release: 2017/01/31 Operating System: Win7 (64bit)
Hi all, I got a problem while creating an analysis template for batch processing. I just started to work with Labtalk but I was able to write a quick script which does some statistics and worksheet manipulations. I included this LabTalk script into an custom defined menu so that I can easily click that button once and get my results. This works fine but I now want to include this data manipulation into a batch process. When I conduct this processing on an examplary datasheet and want to save it as an analysis template, Origin tells me that no operation in the workbook was detected and that I shall save it via "File:Save Window as". After doing so, I start the batch process and choose this file as analysis template but I do not understand what happens next. My analysis template contains a "result"sheet whose data should be collected in a summery after the batchprocessing. But in each datasheet I see the same results which come from the first imported dataset, thus, my Summery includes only the same data.
%n=wks.name$; //get the name of the active sheet. In batch processing each dataset gets processed after each other, meaning that the next sheet will be active, therefore changing this parameter for each dataset, right?
string sheet$=wks.name$; %O = %[%n,#1,\x20]; // Find second token delimited by 'space' (hexadecimal 20), I need these numeric values later; %P = %[%n,#2,\x20]; // Find second token delimited by 'space' (hexadecimal 20) I need these numeric values later;
colstats 10 max:=<new>; //find the maximum value in 10th col in active wks, but then the result sheet becomes active, therefore I want to switch back to the datasheet:
page.active$=sheet$; //activates the datasheet (I have the feeling, somewhere here is the mistake, since maybe I always refer to the same wks and I am not variable to the new datasheet from the newly imported dataset?
colstats 10 min:=<new>; //find the minimum of 10th col
Afterwards I only create a new wks and refer the results of max and min into some cells via a link (e.g. "cell://Sheet1!F[1]").
What do I do wrong?
Thank you very much! Best, Oliver |
|