Choose Language Hide Translation Bar
Highlighted
Thierry_S
Level VI

Save Presentation (pptx): is it possible to modify dynamically (JSL) the slide title?

Hi JMP Community,

 

When you save a Journal as a PowerPoint presentation (pptx), the export algorithm uses the name of each OutlineBox to populate the title (as editable text) on each slide. Is it possible to reproduce this step in a JSL script where the slide title would be generated dynamically (change the default OutlineBox name)?

 

For example, I have generated a large number of GB plots (script generated) that are stored in a journal. When I export this journal as a pptx file, all the slide titles are labelled as "Graph Builder" because the OutlineBox names are all by default set to "Graph Builder". In this particular case, I would like to change the the slide title from "Graph Builder" to the content of the TextEditBox nested in the PictureBox for each plot.

 

I have read that the export to pptx algorithm is a third party product that is essentially a black box. If it is the case, I would greatly appreciate hearing about work around ideas.

 

Thank you for your help.

 

Sincerely,

 

TS  

 

Thierry R. Sornasse
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Save Presentation (pptx): is it possible to modify dynamically (JSL) the slide title?

Changing, deleting, moving, etc. of the different objects in the JMP output is one of the most powerful abilities in JMP.  This capability is detailed in the Scripting Guide, in the Section on Display Trees.  Below is a simple example of doing what you indicated your current need is:

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");

biv = dt << Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);

report(biv)[Outlinebox(1)] << set title("This is my title");

report(biv) << journal;
biv << close window;


biv = dt << Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :height ) ),
	Elements( Box Plot( X, Y, Legend( 4 ) ) )
);

report(biv)[Outlinebox(1)] << set title("A different title");

report(biv) << journal;
biv << close window;

jour = current journal();

jour << Save Presentation("$TEMP/MyTitles.pptx");

open("$TEMP/MyTitles.pptx");

titles.PNG

Jim

View solution in original post

1 REPLY 1
Highlighted
txnelson
Super User

Re: Save Presentation (pptx): is it possible to modify dynamically (JSL) the slide title?

Changing, deleting, moving, etc. of the different objects in the JMP output is one of the most powerful abilities in JMP.  This capability is detailed in the Scripting Guide, in the Section on Display Trees.  Below is a simple example of doing what you indicated your current need is:

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");

biv = dt << Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);

report(biv)[Outlinebox(1)] << set title("This is my title");

report(biv) << journal;
biv << close window;


biv = dt << Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :height ) ),
	Elements( Box Plot( X, Y, Legend( 4 ) ) )
);

report(biv)[Outlinebox(1)] << set title("A different title");

report(biv) << journal;
biv << close window;

jour = current journal();

jour << Save Presentation("$TEMP/MyTitles.pptx");

open("$TEMP/MyTitles.pptx");

titles.PNG

Jim

View solution in original post

Article Labels

    There are no labels assigned to this post.