Hi JMP Community,
I'm making some progress in my attempt to generate PowerPoint slides assembled from the Plots stored in multiple journals (JRN) files.
The following script produces the right output but it is quite slow most likely due to the repeated calls to << Save Presentation ("file_name", Append).
I think it would be much faster to aggregate the different plots in a master container (new window or new Journal) and then use Save Presentation only once for the entire master container. How could I do this: I'm getting a bit confused about the nesting of different display structures.
Names Default to Here (1);
dummy = H List Box ();
dummy << Save Presentation ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx", Template ("C:\Users\sornstr\Desktop\JMP Scripts\SANDBOX\JMPExportTemplate_TS.pptx"), Outline Titles (Top Left));
jrn1 = Get Window("Journal: FIRST JOURNAL");
jrn2 = Get Window("Journal: SECOND JOURNAL");
For (i = 0, i <50, i++,
Plot1 = jrn1 [PictureBox(i+1)];
Plot2 = jrn2 [PictureBox(i+1)];
TitleTxt = jrn1 [TextEditBox((i*3)+1)] << get text;
Show (TitleTxt);
MylpBox = Lineup Box (N Col (4));
SPRI = SpacerBox (size (50,50)) << get picture;
MylpBox << Append (SPRI);
MylpBox << Append (Plot1);
MylpBox << Append (Plot2);
MylpBox << Append (SPRI);
PLOTS = MylpBox << get picture;
nw = New Window ("SERENE UC",
OutlineBox(TitleTxt,
PictureBox (PLOTS)
)
);
nw << Save Presentation ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx", Append, Outline Titles (Top Left));
nw << close window;
);
open ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx");
Thank you for your help.
Sincerely,
TS
Thierry R. Sornasse