Author |
Topic  |
|
asafok
Sweden
5 Posts |
Posted - 03/14/2019 : 11:24:02 AM
|
Origin Ver. 2019 64bit trial; Operating System:windows 10, 64 bit This script file is working well when run using "execute current section" in the debug menue of the code builder, but when run from the command window using run *.ogs, it behaves strangely: once doc -e W loop is over instead of stopping, it continues and run the sections below.
[main] run.loadoc(winshow.c); int i,j; //string methodtype; doc -ef W { type "starting new ittiration"; %W = %H; String methodtype$=page.longname$; methodtype$=; i=methodtype.Match("*Freq*"); j=methodtype.Match("*viscosity*"); //i=; //j=; if (j==1) {run.section( , VisPlot);}; else {run.section( , OscPlot);}; }; return;
[OscPlot] type "OSCPlot"; i=; string bookname$ = page.longname$; bookname$=; range Freq=col(g); range ElasMod=col(k); range ViscMod=col(l); range PHangle=col(n); plotxy iy:=(7,11:12) plot:=201; page.longname$=; page.longname$ = bookname$; axis -ps X S 1; layer -g; layadd type:=rightY linkto:=1; plotxy [bookname$]sheet1!(7,14) plot:=201 ogl:=2 color:=3; layer.y.from=0; layer.y.to=90; layer.x.from=1; layer.x.to=60; Return; [VisPlot] type "VisPlot"; string bookname$ = page.longname$; bookname$=; range Sreate=col(h); range Svisc=col(i); plotxy iy:=(8:9) plot:=201; Return; |
Edited by - asafok on 03/14/2019 11:26:05 AM |
|
yuki_wu
896 Posts |
Posted - 03/14/2019 : 9:49:29 PM
|
Hi,
If you use run.file to execute the LabTalk script file, all sections will be execute. You should use run.section to specify the section you want to execute. Please find more info here: https://www.originlab.com/doc/LabTalk/ref/Run-obj
Regards, Yuki
OriginLab
|
 |
|
asafok
Sweden
5 Posts |
Posted - 03/15/2019 : 03:18:30 AM
|
thank you very much, that solved the issue
|
 |
|
|
Topic  |
|
|
|