Run - Extends SMath Studio with the ability to run other worksheets in background - Messages






- installation: SMath Studio: Tools > Plugins... > Online Gallery (be sure to have the "Exclude beta-versions" unchecked);
- documentation: (beta) Run Example.7z (4 KiB) downloaded 244 time(s)..



Only thing better would be not needing to use data propagation between the worksheets (e.g. using rfile,
wfile, importData, exportData, ...).
WroteWill this allow us to transfer data? SWEET!
Is more targeted to process data "remotely"; data transfer is driven by existing functions (also include());
WroteOnly thing better would be not needing to use data propagation between the worksheets (e.g. using rfile, wfile, importData, exportData, ...).
I think the only other way, in the scenario drawn in the example of the first post, would be to transfer data via functions, that is not a feasible way as for now.
Also, I have to improve the log system to better recognize if there are errors in the target worksheets.

WroteHow is this different than "Include" plug in by Uni?
Mainly:
include() loads the SMath variables/functions from the target worksheet into the one in use, while in Run() each worksheet is indipendent;
include() can't run non-math regions (ComboBoxList, etc...) while Run() execute everything;
Don't take my comment bad. Your snippets are always blurry [not comfortable].
You can "PrintScreen" paste in Paint to select the portion. That results in
huge BMP... then reduce to 256 via IrfanView: superfreeware of multiuse ...
mostly: sharpen image, superbe Lanczos zoon [square/rectangular] gray/color
images ++++ .
I use this technique as well as capture a selected region from WinGrab
[freeware]. Wingrag has more options to reduce 256 colors, in many difficult
cases of better quality than IrfanView, though is does not apply to Smath snippets.
Cheers, Jean
Thanks for your valuable suggestions.
WroteProblem in 98.6081?
Hello ndtma,
yes, seems there are isSies with the process handle. I'm looking to find the cause and if I can solve it

thx!
new loopSheet.sm
initCalc.sm
handleCalcResults.sm
So I went ahead and tried out your idea, it does solve the only 'running' once issue and finishes the script in 6 seconds no matter what.
But now I have the issue where the Run(exec) command does not seem to be running all the scripts in the exec matrix, or somehow it's only saving the first 'calcResults' in 'allResults'. That said, I was successful in manually looping the 3 sheets, so I thin something is going on incorrectly in the run(exec) line.
You can see what I did in the gifs below if you open them full size in a new tab..
Thoughts?
Calc completed successfully by manually looping the 3 sheets:
Calc running with loop sheet, only records first row result:
Wroteso I think something is going on incorrectly in the run(exec) line.
That I don't understand the idea/purpose of run does not indicate it is useless.
Do you mean run would calculate in a cash of some sort a selection of work sheets
and then would show all calculated by clicking "Open file" ?
WroteThanks for the response Davide.
...
You can see what I did in the gifs below if you open them full size in a new tab..
Thoughts?
...
Hi K. Gif shows that you modify iniCalc.sm (disabling some calcs) but don't save it, so others SMath files read the original iniCalc.sm, not the modified. Is this the issue or I'm are not understanding something else?
Best regards.
Alvaro.

testCalc.sm (3 KiB) downloaded 86 time(s).
handleCalcResults.sm (5 KiB) downloaded 79 time(s).
initCalc.sm (9 KiB) downloaded 81 time(s).
input.xlsx (8 KiB) downloaded 73 time(s).
loopSheet.sm (10 KiB) downloaded 77 time(s).
This gave me what I want..
Run(exec)
Run(exec)
Run(exec)
I quit, there's something with run() only running files if they have a different name, or the Run(exec) is called again (like above). I created a new, simpler example.. Below shows that if exec is defined with 3 separate but identical calc.sm files (calc1.sm, calc2.sm, etc) then run(exec) will run all 3 files and the allResults var is fully populated. If I define exec as a vector with all the same calc.sm files then it won't work and allResults will just end up with the first result.
calcSheet.sm (5 KiB) downloaded 77 time(s).
loopSheet.sm (5 KiB) downloaded 73 time(s).

WroteI reran it after saving everything and the same thing happened
Document calcSheet calculates nothing [no maths/formula(s)/result(s)]
Certainly no gadget will retrieve something from nothing, is it ?
If calcSheet calculates something, save to file and retrieve from
any other Smath work sheet. On the other hand, you may save formula(s)
in calcsheet and retrieve from any other Smath work sheet then modify
the formula(s) in the working document ... per say change parameters.
You say nothing about what you have in mind.
WroteDocument calcSheet calculates nothing [no maths/formula(s)/result(s)]
I know in this case calcSheet.sm is not "calculating" anything. The whole problem we're trying to solve is looping a large data set through the calcSheet, row by row, which processes the data with whatever formulas we want, in this case it's 1*data

WroteI know in this case calcSheet.sm is not "calculating" anything. The whole problem we're trying to solve is looping a large data set through the calcSheet, row by row, which processes the data with whatever formulas we want, in this case it's 1*data my previous example actually took one of the values in the 'current row' and multiplied it by 3.I just wanted to make the example here as simple as possible so we could hone in on the problem.
Simply attach the basic project and describe the next part of the project.
As you explain, it looks weird from maybe baby simple.
-
New Posts
-
No New Posts