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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 script file execution is strange

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
asafok 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;
2   L A T E S T    R E P L I E S    (Newest First)
asafok Posted - 03/15/2019 : 03:18:30 AM
thank you very much, that solved the issue

yuki_wu 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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000