cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
WebDesignesCrow
Super User

How to save Dashboard to run animation (.gif) through JSL?

Hello expert,

I want to save my Dashboard in .gif (animation) through JSL because "Date" is not interactive in html.

The local data filter for animation is based on AVI date (date will change daily because data being refreshed).

Manually, I can "save as" in .gif after I setup & run the animation controls.

I think this type of analysis also can be automated through JSL.

So I export the dashboard script to script window while running the animation, but the animation not running when I run the script. 

 

My question is;

- How to improve this script to straight away run the animation in JSL? --> Workflow did not capture "Run Animation" action so I don't have a clue.

- How to save the animated dashboard in JSL?

 

I also refer to other discussions below but the method is for graph builder whilst in my case it is dashboard.

https://community.jmp.com/t5/JMP-Scripts/Save-a-Data-Filter-animation-as-an-animated-GIF/ta-p/24003

https://community.jmp.com/t5/Discussions/Saving-JMP-animation/m-p/37025

 

I'm using JMP 17.0

 

Thank you in advance !

 

1 ACCEPTED SOLUTION

Accepted Solutions
WebDesignesCrow
Super User

Re: How to save Dashboard to run animation (.gif) through JSL?

I'm updating my progress with the assistance from genius JMP technical support ;

 

Additional reference that is cool & useful

Local Data Filter Animation
https://community.jmp.com/t5/Discussions/Local-Data-filter-amp-Animation-how-to-specify-the-range/td...

Animated GIF
https://community.jmp.com/t5/Uncharted/Animated-GIF-JMP-13/ba-p/21197

 

1) For now, JSL can instruct the dashboard animation control to run using below codes.

 

 

 // Play animation (button 2) ---> OK
 playbtn = window("DashboardName")["Local Data Filter", TabPageBox(1), ButtonBox(2)];
 playbtn << Click();

2) Still working to record the animation & save to animated gif.

 

Currently, the attempt using below codes causing JMP to crash - seems it starts recording (with clicking without release)

 

 // Start to record animation (button 6) --> RUNNING BUT JMP CRASH BEFORE NEXT STEP
startrecordbtn = window("Sheet1_LEFTOUTER - Dashboard")["Local Data Filter", TabPageBox(1), ButtonBox(6)];
startrecordbtn << Click();
wait(1.5);

 // Stop to record animation (button 6)
stoprecordbtn = window("Sheet1_LEFTOUTER - Dashboard")["Local Data Filter", TabPageBox(1), ButtonBox(6)];
stoprecordbtn << Click();
wait(1);

 // Save recorded animation (button 7)
saveanimation = window("Sheet1_LEFTOUTER - Dashboard")["Local Data Filter", TabPageBox(1), ButtonBox(7)];
saveanimation << Click();

WebDesignesCrow_0-1704864849520.png

 

 

 

View solution in original post

4 REPLIES 4
WebDesignesCrow
Super User

Re: How to save Dashboard to run animation (.gif) through JSL?

I'm updating my progress with the assistance from genius JMP technical support ;

 

Additional reference that is cool & useful

Local Data Filter Animation
https://community.jmp.com/t5/Discussions/Local-Data-filter-amp-Animation-how-to-specify-the-range/td...

Animated GIF
https://community.jmp.com/t5/Uncharted/Animated-GIF-JMP-13/ba-p/21197

 

1) For now, JSL can instruct the dashboard animation control to run using below codes.

 

 

 // Play animation (button 2) ---> OK
 playbtn = window("DashboardName")["Local Data Filter", TabPageBox(1), ButtonBox(2)];
 playbtn << Click();

2) Still working to record the animation & save to animated gif.

 

Currently, the attempt using below codes causing JMP to crash - seems it starts recording (with clicking without release)

 

 // Start to record animation (button 6) --> RUNNING BUT JMP CRASH BEFORE NEXT STEP
startrecordbtn = window("Sheet1_LEFTOUTER - Dashboard")["Local Data Filter", TabPageBox(1), ButtonBox(6)];
startrecordbtn << Click();
wait(1.5);

 // Stop to record animation (button 6)
stoprecordbtn = window("Sheet1_LEFTOUTER - Dashboard")["Local Data Filter", TabPageBox(1), ButtonBox(6)];
stoprecordbtn << Click();
wait(1);

 // Save recorded animation (button 7)
saveanimation = window("Sheet1_LEFTOUTER - Dashboard")["Local Data Filter", TabPageBox(1), ButtonBox(7)];
saveanimation << Click();

WebDesignesCrow_0-1704864849520.png

 

 

 

WebDesignesCrow
Super User

Re: How to save Dashboard to run animation (.gif) through JSL?

All attempts for "Record" & "Save as animated GIF" instruction via JSL ended with crash even with simpler script.

I've submitted crash report as advised from JMP technical support (Both JMP 17.0 & 17.2 crash. I'm using Windows 10).

names default to here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp")
dt << Graph Builder(
        Size( 588, 528 ),
        Show Control Panel( 0 ),
        Variables( X( :age ), Y( :sex ) ),
        Elements( Heatmap( X, Y, Legend( 2 ) ) ),
        Local Data Filter(
               Conditional,
               Add Filter(
                       columns( :age ),
                       Where( :age == 14 ),
                       Display( :age, N Items( 6 ) )
               ),
               Animation( Animate Column( :age ) )
        )
);
playbtn = Window("Big Class - Graph Builder")["Local Data Filter",TabPageBox(1),ButtonBox(2)];

recordbtn = Window("Big Class - Graph Builder")["Local Data Filter",TabPageBox(1),ButtonBox(6)];

// Test play
print("starting play test");
playbtn << click();
wait(2);
playbtn << click();
print("ending play test");
wait(2);
// Test record
print("starting record test");
recordbtn << set(1);
playbtn << click();
wait(2);
playbtn << click();
recordbtn << set(0);
print("ending play test");

Hopefully, JMP 18 will consider this improvement so that animated GIF can be recorded & saved automatically (since it can be done by clicking using hand without crash)

 

hogi
Level XII

Re: How to save Dashboard to run animation (.gif) through JSL?

Hm, don't know if Jmp 18 will solve the issue ...
Also Jmp18 EA crashes with the code above.

 

Do you need a gif or is it OK to get individual screenshot of all steps?

For the latter, you could write a script which clicks on each entry in the data filter and then saves the corresponding graph as an image.

 

Such a function is included in the  Graph Builder Toolbar - but I just noticed that I did not update the version in the community for a while. -> I just uploaded it now, but the review process will take a while  ...

WebDesignesCrow
Super User

Re: How to save Dashboard to run animation (.gif) through JSL?

Hi Hogi,

Basically, I just a need an animated gif.

My thought processes is; to let JMP imitate my manual clicking through JSL.

But, workflow or log did not save "record" click activity so that I can save as animated .gif.

The best I could do now is to automate Dashboard "run". (not able to solve record GIF > save as animated GIF).

For "clicking each entry in data filter", it may work if it use BigClass data (data filter = category).

But, my actual data filter for the dashboard is  date. My animated dashboard example as below.

AnimatedDashboard.gif

If there's a workaround, I would be extremely grateful because I need to automate the flow until animated .GIF.