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
 Chaining mathtool commands

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
ScriptQuestions Posted - 03/02/2022 : 04:36:40 AM
Hello.

I am currently trying to execute a script made in the Code Builder similar to this:


mathtool -r 2 iy1:=[Book1]"Sheet1"!(A"Temperature",F"Value") operator:=sub iy2:=[Book2]"Sheet1"!(A"Temperature",I"DifferentValue1") oy:=[Book1]"Sheet1"!(A"Temperature",G"FirstResult");

//these are options that i tried to achieve my goal, but did not work so far.
run -auf 1 0;
doc -uw;
second -poc 3;
save;

mathtool -r 2 iy1:=[Book1]"Sheet1"!(A"Temperature",H"FirstResultAltered") iy2:=[Book2]"Sheet1"!(A"Temperature",I"DifferentValue2") oy:=[Book1]"Sheet1"!(A"Temperature",M"FinalResult");


This is a simplified version of my script. The difference between FirstResult and FirstResultAltered is that the content of FirstResultAltered is gained by a formula dependent on the column FirstResult.
For example, Col("FirstResultAltered")[O]$= Col("FirstResult")^2.

My current problem is that the script finishes before recalculation was done, resulting in the second mathtool operation to put out empty lines filled with "--".

I tried running the script both with run ScriptName.ogs, and run.file(Scriptname.ogs), but in both cases it does the same thing.

So my question is: How do I make the script wait for recalculation to finish before performing a second mathtool operation?
1   L A T E S T    R E P L I E S    (Newest First)
ScriptQuestions Posted - 03/02/2022 : 05:21:43 AM
Found the solution:

run -p au;

before the second calculation causes the program to wait for recalculation.

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