Open Plot with Thyme

About advanced scenes, and the Thyme scripting language used in Algodoo.

Open Plot with Thyme

Postby The Linkage » Thu Feb 23, 2017 3:12 am

okay, new problem.Is there any way to open a plot just like the browser, with a script? Not a life-death situation, but if I manage to make that automatic the scene would be better. Thanks
The Linkage
 
Posts: 57
Joined: Fri Aug 05, 2011 5:40 pm
Location: Escobar, Argentina

Re: Open Plot with Thyme

Postby Kilinich » Thu Feb 23, 2017 9:57 am

Sure you can. Save scene with plot and dig into .phz -> .phn, you will see an example how to do it:

Code: Select all
Scene.addWidget {
    widgetID := "Plot";
    entityIDs := [73];
    title := "Polygon";
    minimized := false;
    pos := [570.50000, 126.50000];
    size := [581.00000, 435.00000];
    visible := true;
    snappedParentMin := [false, false];
    snappedParentMax := [false, false];
    contents := {
        timeSpan := 30.000000;
        smoothWidth := 0.00000000;
        drawAxes := true;
        drawLegends := true;
        sources := [["Plot_SimTime"], ["Plot_Speed"]];
        visible := [["Plot_SimTime", "Plot_Speed"]];
        collapsed := false
    }
}
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: Open Plot with Thyme

Postby The Linkage » Thu Feb 23, 2017 7:56 pm

Thank you! :thumbup: that's really useful
The Linkage
 
Posts: 57
Joined: Fri Aug 05, 2011 5:40 pm
Location: Escobar, Argentina


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron