<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JSL Optimization for speed: Avoiding repeated calls to Save Presentation (&amp;quot;File&amp;quot;, Append) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Optimization-for-speed-Avoiding-repeated-calls-to-Save/m-p/253788#M49835</link>
    <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm making some progress in my attempt to generate PowerPoint slides assembled from the Plots stored in multiple journals (JRN) files.&lt;/P&gt;&lt;P&gt;The following script produces the right output but it is quite slow most likely due to the repeated calls to &amp;lt;&amp;lt; Save Presentation ("file_name", &lt;U&gt;&lt;STRONG&gt;Append&lt;/STRONG&gt;&lt;/U&gt;).&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

dummy = H List Box ();

dummy &amp;lt;&amp;lt; 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 &amp;lt;50, i++, 
	
	Plot1 = jrn1 [PictureBox(i+1)];
	Plot2 = jrn2 [PictureBox(i+1)];
	TitleTxt = jrn1 [TextEditBox((i*3)+1)] &amp;lt;&amp;lt; get text;
	
	Show (TitleTxt);
		
	MylpBox = Lineup Box (N Col (4));
	
	SPRI = SpacerBox (size (50,50)) &amp;lt;&amp;lt; get picture;
	
	MylpBox &amp;lt;&amp;lt; Append (SPRI);
	MylpBox &amp;lt;&amp;lt; Append (Plot1);
	MylpBox &amp;lt;&amp;lt; Append (Plot2);
	MylpBox &amp;lt;&amp;lt; Append (SPRI);
	
	PLOTS  = MylpBox &amp;lt;&amp;lt; get picture;
	
	nw = New Window ("SERENE UC",
					OutlineBox(TitleTxt,
							
							PictureBox (PLOTS)
								
							)
						
					);
		
	nw &amp;lt;&amp;lt; Save Presentation ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx", Append, Outline Titles (Top Left));
	
	nw &amp;lt;&amp;lt; close window;
	
);	

open ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2020 15:34:35 GMT</pubDate>
    <dc:creator>Thierry_S</dc:creator>
    <dc:date>2020-03-23T15:34:35Z</dc:date>
    <item>
      <title>JSL Optimization for speed: Avoiding repeated calls to Save Presentation ("File", Append)</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Optimization-for-speed-Avoiding-repeated-calls-to-Save/m-p/253788#M49835</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm making some progress in my attempt to generate PowerPoint slides assembled from the Plots stored in multiple journals (JRN) files.&lt;/P&gt;&lt;P&gt;The following script produces the right output but it is quite slow most likely due to the repeated calls to &amp;lt;&amp;lt; Save Presentation ("file_name", &lt;U&gt;&lt;STRONG&gt;Append&lt;/STRONG&gt;&lt;/U&gt;).&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

dummy = H List Box ();

dummy &amp;lt;&amp;lt; 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 &amp;lt;50, i++, 
	
	Plot1 = jrn1 [PictureBox(i+1)];
	Plot2 = jrn2 [PictureBox(i+1)];
	TitleTxt = jrn1 [TextEditBox((i*3)+1)] &amp;lt;&amp;lt; get text;
	
	Show (TitleTxt);
		
	MylpBox = Lineup Box (N Col (4));
	
	SPRI = SpacerBox (size (50,50)) &amp;lt;&amp;lt; get picture;
	
	MylpBox &amp;lt;&amp;lt; Append (SPRI);
	MylpBox &amp;lt;&amp;lt; Append (Plot1);
	MylpBox &amp;lt;&amp;lt; Append (Plot2);
	MylpBox &amp;lt;&amp;lt; Append (SPRI);
	
	PLOTS  = MylpBox &amp;lt;&amp;lt; get picture;
	
	nw = New Window ("SERENE UC",
					OutlineBox(TitleTxt,
							
							PictureBox (PLOTS)
								
							)
						
					);
		
	nw &amp;lt;&amp;lt; Save Presentation ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx", Append, Outline Titles (Top Left));
	
	nw &amp;lt;&amp;lt; close window;
	
);	

open ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 15:34:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Optimization-for-speed-Avoiding-repeated-calls-to-Save/m-p/253788#M49835</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2020-03-23T15:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Optimization for speed: Avoiding repeated calls to Save Presentation ("File", Append)</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Optimization-for-speed-Avoiding-repeated-calls-to-Save/m-p/253831#M49841</link>
      <description>&lt;P&gt;Hi JMP community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I solved my problem: I just needed to create a new journal into which I placed the composite plots (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

jrn1 = Get Window("FIRST_JOURNAL");
jrn2 = Get Window("SECOND_JOURNAL");
jrn_out = New Window ("COMPIL",&amp;lt;&amp;lt; journal);


For (i = 0, i &amp;lt;3, i++, 
	
	Plot1 = jrn1 [PictureBox(i+1)];
	Plot2 = jrn2 [PictureBox(i+1)];
	TitleTxt = jrn1 [TextEditBox((i*3)+1)] &amp;lt;&amp;lt; get text;
	
	Show (TitleTxt);
		
	MylpBox = Lineup Box (N Col (4));
	
	SPRI = SpacerBox (size (50,50)) &amp;lt;&amp;lt; get picture;
	
	MylpBox &amp;lt;&amp;lt; Append (SPRI);
	MylpBox &amp;lt;&amp;lt; Append (Plot1);
	MylpBox &amp;lt;&amp;lt; Append (Plot2);
	MylpBox &amp;lt;&amp;lt; Append (SPRI);
	
	PLOTS  = MylpBox &amp;lt;&amp;lt; get picture;
	
	nw = New Window ("SERENE UC",
					OutlineBox(TitleTxt,
							
							PictureBox (PLOTS)
								
							)
						
					);
		

	jrn_out &amp;lt;&amp;lt; Append (nw);
	nw &amp;lt;&amp;lt; close window;
	
);	
jrn_out &amp;lt;&amp;lt; 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));
open ("C:\Users\sornstr\Desktop\TEMP PNG\NEW OUTPUT.pptx");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Mar 2020 16:49:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Optimization-for-speed-Avoiding-repeated-calls-to-Save/m-p/253831#M49841</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2020-03-23T16:49:22Z</dc:date>
    </item>
  </channel>
</rss>

