cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
markus
Level IV

JSL: Save dashboard as interactive html

I built a dashboard from a script and want to save it as an interactive html and close it afterwards. The script runs fine, but the saving and closing doesn't. 

I tried it with something similar than this, but it doesn't work.

Help is appreciated! Thanks in advance!

Markus

Names Default To Here( 1 );
Open("$SAMPLE_DATA/Quality Control/Steam Turbine Historical.jmp");
app = JMP App();
app << Open File( "$SAMPLE_DASHBOARDS/Instant Dashboard.jmpappsource" );
box = app << Run;

box << save html("C:\Users\Markus\Desktop\test.htm");
close(box);
2 ACCEPTED SOLUTIONS

Accepted Solutions
Georg
Level VII

Re: JSL: Save dashboard as interactive html

I think the run application command gave a different type than you expected,

try the attached script.

 

Names Default To Here( 1 );

tmp_path = Substitute( Right( Convert File Path( "$TEMP" ), Length( Convert File Path( "$TEMP" ) ) - 1 ), "/", "\" );

Open( "$SAMPLE_DATA/Quality Control/Steam Turbine Historical.jmp" );
app = JMP App();
app << Open File( "$SAMPLE_DASHBOARDS/Instant Dashboard.jmpappsource" );
box = app << Run;

Show Properties( box );
Show( box );

(box << get windows)[1] << save html( "$TEMP\test.htm" );
Georg

View solution in original post

Re: JSL: Save dashboard as interactive html

For Interactive HTML, you should use 

Save Interactive HTML

instead of  'save HTML'

- John

View solution in original post

6 REPLIES 6
Georg
Level VII

Re: JSL: Save dashboard as interactive html

I think the run application command gave a different type than you expected,

try the attached script.

 

Names Default To Here( 1 );

tmp_path = Substitute( Right( Convert File Path( "$TEMP" ), Length( Convert File Path( "$TEMP" ) ) - 1 ), "/", "\" );

Open( "$SAMPLE_DATA/Quality Control/Steam Turbine Historical.jmp" );
app = JMP App();
app << Open File( "$SAMPLE_DASHBOARDS/Instant Dashboard.jmpappsource" );
box = app << Run;

Show Properties( box );
Show( box );

(box << get windows)[1] << save html( "$TEMP\test.htm" );
Georg
markus
Level IV

Re: JSL: Save dashboard as interactive html

Hi Georg,

thanks for the advice. You are write. It is working now.

Do you have also an idea to save it as an interactive (html5) file, too?

Regards

Markus

markus
Level IV

Re: JSL: Save dashboard as interactive html

PS: The example I have taken from the community and added the saving part. In reality I build a skript which looks like this (abreviated (...) because it is very long).

HTL = JMP App( ... );
box = htl << run;

Show Properties( box );
Show( box );
(box << get windows)[1] << html save( "C:\...\name.htm" );
Close( box );

I have introduced your suggestions, but it is not running. Where is the mistake?

Thanks in advance

Markus

markus
Level IV

Re: JSL: Save dashboard as interactive html

I found the mistake:

my command line said:   << html save ()

correct it should be:  << save html ()

With this it worked.

So there is still the question for the interactive html version.

 

Markus

Re: JSL: Save dashboard as interactive html

For Interactive HTML, you should use 

Save Interactive HTML

instead of  'save HTML'

- John

markus
Level IV

Re: JSL: Save dashboard as interactive html

Thanks to both of you John and George!

Now the script works fine!

Best Regards 

Markus