The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 batch processing with LabTalk script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Oliver Reimer

Germany
1 Posts

Posted - 06/28/2016 :  6:12:29 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000