Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 12 April 2016 20:46:51(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,179
Man
Italy
Location: Italy

Was thanked: 1102 time(s) in 723 post(s)
SMath Studio compatibility SMath Viewer compatibility mono compatibility

extension page Sources MIT license


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


Beta >>> PLEASE REPORT IN THIS TOPIC ANY ISSUE, MORE DETAILED AS POSSIBLE <<< Beta

Edited by user 17 November 2018 19:37:28(UTC)  | Reason: badges

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 5 users thanked Davide Carpi for this useful post.
on 12/04/2016(UTC),  on 12/04/2016(UTC),  on 12/04/2016(UTC),  on 13/04/2016(UTC),  on 13/04/2016(UTC)
Offline ElSid  
#2 Posted : 12 April 2016 22:09:25(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 279
Man
United States
Location: USA

Was thanked: 9 time(s) in 8 post(s)
Will this allow us to transfer data? SWEET!Clap
Only thing better would be not needing to use data propagation between the worksheets (e.g. using rfile,
wfile, importData, exportData, ...).

Edited by user 12 April 2016 22:35:15(UTC)  | Reason: Not specified

Offline Davide Carpi  
#3 Posted : 13 April 2016 20:21:48(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,179
Man
Italy
Location: Italy

Was thanked: 1102 time(s) in 723 post(s)
Originally Posted by: ElSid Go to Quoted Post
Will this allow us to transfer data? SWEET!Clap

Is more targeted to process data "remotely"; data transfer is driven by existing functions (also include());

Originally Posted by: ElSid Go to Quoted Post
Only 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. Umnik

Edited by user 13 April 2016 20:23:39(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline ElSid  
#4 Posted : 15 April 2016 23:12:30(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 279
Man
United States
Location: USA

Was thanked: 9 time(s) in 8 post(s)
How is this different than "Include" plug in by Uni?

Offline Davide Carpi  
#5 Posted : 16 April 2016 18:39:42(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,179
Man
Italy
Location: Italy

Was thanked: 1102 time(s) in 723 post(s)
Originally Posted by: ElSid Go to Quoted Post
How 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;
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline ndtma  
#6 Posted : 27 August 2016 08:28:06(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 188
Man
Sri Lanka
Location: Colombo

Was thanked: 65 time(s) in 43 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
  • requirements: SMath Studio 0.98.5935 or later;
  • installation: SMath Studio: Tools


  • Problem in 98.6081?

    Run error.png
    The mind is everything. What you think you become.
    Best Regards
    Eng. NDTM Amarasekera - Sri Lanka
    Offline Jean Giraud  
    #7 Posted : 27 August 2016 14:48:06(UTC)
    Jean Giraud


    Rank: Advanced Member

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 3,697
    Canada

    Was thanked: 683 time(s) in 533 post(s)
    Hello collab ndtma,

    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
    Offline ndtma  
    #8 Posted : 27 August 2016 16:10:59(UTC)
    ndtma


    Rank: Advanced Member

    Groups: Registered
    Joined: 05/06/2014(UTC)
    Posts: 188
    Man
    Sri Lanka
    Location: Colombo

    Was thanked: 65 time(s) in 43 post(s)
    Hello Jean,

    Thanks for your valuable suggestions.
    The mind is everything. What you think you become.
    Best Regards
    Eng. NDTM Amarasekera - Sri Lanka
    Offline Davide Carpi  
    #9 Posted : 27 August 2016 16:29:53(UTC)
    Davide Carpi


    Rank: Advanced Member

    Groups: Registered, Advanced Member
    Joined: 13/01/2012(UTC)
    Posts: 2,179
    Man
    Italy
    Location: Italy

    Was thanked: 1102 time(s) in 723 post(s)
    Originally Posted by: ndtma Go to Quoted Post
    Problem 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 Umnik

    Edited by user 27 August 2016 23:56:46(UTC)  | Reason: typo

    If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
    Offline Davide Carpi  
    #10 Posted : 29 August 2016 19:05:21(UTC)
    Davide Carpi


    Rank: Advanced Member

    Groups: Registered, Advanced Member
    Joined: 13/01/2012(UTC)
    Posts: 2,179
    Man
    Italy
    Location: Italy

    Was thanked: 1102 time(s) in 723 post(s)
    Issue found.


    edit: fixed in SS 0.98.6179

    Edited by user 02 December 2016 02:42:03(UTC)  | Reason: fix not included in latest relase

    If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
    Offline ksullivan  
    #11 Posted : 01 November 2018 21:30:04(UTC)
    ksullivan

    Rank: Newbie

    Groups: Registered
    Joined: 11/01/2017(UTC)
    Posts: 6
    Man
    Canada
    Location: Vancouver, BC

    Hi Davide, I created my own example with a 3x3 excel table and it takes about 6 seconds for the "Run" function to execute each row of test data during the for loop. The smath sheet it's running contains 2 variables multiplied together and output as a variable 'd'. Your entire example runs in 22 seconds, with definitely a bit more complexity, but not much. Any ideas here? I'd like to run 400 rows of data (load cases for different members) through a calc sheet and collect the results, just like you've done (except only one calc sheet, not 3 like you've done).

    thx!

    20181101-001874 screenshot.png

    Edited by user 02 November 2018 20:02:00(UTC)  | Reason: Not specified

    Offline Davide Carpi  
    #12 Posted : 02 November 2018 13:24:46(UTC)
    Davide Carpi


    Rank: Advanced Member

    Groups: Registered, Advanced Member
    Joined: 13/01/2012(UTC)
    Posts: 2,179
    Man
    Italy
    Location: Italy

    Was thanked: 1102 time(s) in 723 post(s)
    Currently each Run function triggers a new instance of SMath Studio; this means that all the initialization process must be done every time, rising the execution time. What you can try is to change the logic to start a single run with multiple worksheets, and init/finalize each loop step in a dedicated file.

    new loopSheet.sm
    2018-11-02 12_24_53-Window.png

    initCalc.sm
    2018-11-02 11_23_04-Window.png

    handleCalcResults.sm
    2018-11-02 11_23_10-Window.png

    Edited by user 02 November 2018 14:25:30(UTC)  | Reason: Not specified

    If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
    thanks 1 user thanked Davide Carpi for this useful post.
    on 02/11/2018(UTC)
    Offline ksullivan  
    #13 Posted : 02 November 2018 20:32:57(UTC)
    ksullivan

    Rank: Newbie

    Groups: Registered
    Joined: 11/01/2017(UTC)
    Posts: 6
    Man
    Canada
    Location: Vancouver, BC

    Thanks for the response Davide.

    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:

    Manual loop method works

    Calc running with loop sheet, only records first row result:

    Calc running with loop sheet
    Offline Jean Giraud  
    #14 Posted : 02 November 2018 21:52:52(UTC)
    Jean Giraud


    Rank: Advanced Member

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 3,697
    Canada

    Was thanked: 683 time(s) in 533 post(s)
    Originally Posted by: ksullivan Go to Quoted Post
    so 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" ?

    Offline Razonar  
    #15 Posted : 03 November 2018 00:21:03(UTC)
    Razonar


    Rank: Advanced Member

    Groups: Registered
    Joined: 28/08/2014(UTC)
    Posts: 365
    Uruguay

    Was thanked: 164 time(s) in 103 post(s)
    Originally Posted by: ksullivan Go to Quoted Post
    Thanks 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.
    Offline ksullivan  
    #16 Posted : 03 November 2018 06:05:52(UTC)
    ksullivan

    Rank: Newbie

    Groups: Registered
    Joined: 11/01/2017(UTC)
    Posts: 6
    Man
    Canada
    Location: Vancouver, BC

    I reran it after saving everything and the same thing happened..here's a non-gif image and the files. I guess Davide's example ran fine so I should be able to figure this out haha. I'm currently troubleshooting so stay posted Good

    testCalc.sm (4kb) downloaded 13 time(s).
    handleCalcResults.sm (6kb) downloaded 13 time(s).
    initCalc.sm (10kb) downloaded 15 time(s).
    input.xlsx (9kb) downloaded 13 time(s).
    loopSheet.sm (11kb) downloaded 12 time(s).

    20181102-001882 screenshot.png


    This gave me what I want..
    Run(exec)
    Run(exec)
    Run(exec)
    20181102-001887 screenshot.png

    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.

    20181102-001888 screenshot.png

    calcSheet.sm (6kb) downloaded 11 time(s).
    loopSheet.sm (6kb) downloaded 9 time(s).

    Edited by user 03 November 2018 08:39:47(UTC)  | Reason: Not specified

    Offline Davide Carpi  
    #17 Posted : 03 November 2018 21:46:07(UTC)
    Davide Carpi


    Rank: Advanced Member

    Groups: Registered, Advanced Member
    Joined: 13/01/2012(UTC)
    Posts: 2,179
    Man
    Italy
    Location: Italy

    Was thanked: 1102 time(s) in 723 post(s)
    You are right, I have to investigate it. Umnik
    If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
    Offline Jean Giraud  
    #18 Posted : 04 November 2018 02:54:20(UTC)
    Jean Giraud


    Rank: Advanced Member

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 3,697
    Canada

    Was thanked: 683 time(s) in 533 post(s)
    Originally Posted by: ksullivan Go to Quoted Post
    I 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.
    Offline ksullivan  
    #19 Posted : 04 November 2018 04:54:49(UTC)
    ksullivan

    Rank: Newbie

    Groups: Registered
    Joined: 11/01/2017(UTC)
    Posts: 6
    Man
    Canada
    Location: Vancouver, BC

    Originally Posted by: Jean Giraud Go to Quoted Post
    Document 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 Good 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.
    Offline Jean Giraud  
    #20 Posted : 04 November 2018 18:38:23(UTC)
    Jean Giraud


    Rank: Advanced Member

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 3,697
    Canada

    Was thanked: 683 time(s) in 533 post(s)
    Originally Posted by: ksullivan Go to Quoted Post
    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 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.

    MatrixStuff.PNG

    Users browsing this topic
    Similar Topics
    Saving Runtime (Questions)
    by RegCurry 11/03/2019 09:23:03(UTC)
    SMath Error Running Lubuntu 18 (Questions)
    by dmmartinez 19/10/2018 23:57:32(UTC)
    Run exe file in DOS from Smath (Questions)
    by Oscar Ugaz 09/07/2018 19:39:58(UTC)
    New version (0.99.6646) does not run (Bugs & Problems)
    by Basile 14/03/2018 03:16:12(UTC)
    Thang U22 Brunei U22 Singapore van phai dung chan tai SEA Games 29 (Questions)
    by Guest 24/08/2017 20:41:17(UTC)
    SMath run error (Bugs & Problems)
    by nierges 17/12/2016 11:31:53(UTC)
    RuneScape takes place in the world of Gielinor (Nightly builds)
    by Guest 22/08/2016 09:25:54(UTC)
    Nike Roshe Run Flyknit Buy (Questions)
    by NancyZero 18/07/2016 10:16:37(UTC)
    Printing real numbers truncated (Bugs & Problems)
    by ioan92 17/02/2016 14:49:27(UTC)
    Nike Roshe Run Online (Project discussion)
    by Danielnter 09/01/2016 09:11:42(UTC)
    Nike Roshe Run Outlet (Questions)
    by Danielnter 09/01/2016 09:08:14(UTC)
    Nike Roshe Run Outlet Store (Samples)
    by Willardbtlerll 15/12/2015 09:10:20(UTC)
    Nike Roshe Run Sale (Samples)
    by Willardbtlerll 15/12/2015 09:08:46(UTC)
    nike free run 2 (Samples)
    by jack51 09/12/2015 06:30:29(UTC)
    nike free run womens sale (Samples)
    by wank80 27/11/2015 06:28:31(UTC)
    2 Pages12>
    Forum Jump  
    You cannot post new topics in this forum.
    You cannot reply to topics in this forum.
    You cannot delete your posts in this forum.
    You cannot edit your posts in this forum.
    You cannot create polls in this forum.
    You cannot vote in polls in this forum.