<?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 Re: Retrieving a path and filename after Save Presentation() is used with no path specified in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59183#M32529</link>
    <description>&lt;P&gt;Ms. Morgan,&lt;/P&gt;
&lt;P&gt;Thank you for replying.&lt;/P&gt;
&lt;P&gt;I obviously failed at&amp;nbsp;specifying my question to any degree of coherency. Let me attempt this again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I&amp;nbsp;use the following code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ) );
rbiv = biv &amp;lt;&amp;lt; report;
rbiv &amp;lt;&amp;lt; Save Presentation(  );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it will generate the Bivariate Platform output and then, because the "Save Presentation()" does not have any path/file name specified, JMP very nicely opens up a window that allows the user to navigate to whatever directory they want, and to specify whatever file name they want.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="save.PNG" style="width: 336px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10954iE889A02C64887309/image-dimensions/336x214?v=v2" width="336" height="214" role="button" title="save.PNG" alt="save.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the behavior I want.&amp;nbsp; However, what I need but I can not figure out how to get i is, that after the user click on "Save" and the Bivariate output is saved to the location and file name&lt;/P&gt;
&lt;P&gt;"How to I determine what path/file name the user specified?".&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 11:45:31 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-06-04T11:45:31Z</dc:date>
    <item>
      <title>Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59123#M32518</link>
      <description>&lt;P&gt;I am using Save Presentation() to save a journal to ppt.&amp;nbsp; However, I want to allow the user to specify the path and file name to save the ppt.&amp;nbsp; If the Save Presentation() is specified without specifying a path/filename, JMP very nicely pops up an operating system Save File window, which allows the user to navigate to whatever folder they desire, and to specify whatever filename they desire.&amp;nbsp; The issue is, that when this method is used, I have not figured out a way to get the path and file name for the saved file.&lt;/P&gt;
&lt;P&gt;Does anyone have a solution to this question?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 17:54:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59123#M32518</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-03T17:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59137#M32523</link>
      <description>&lt;P&gt;Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are a few ways to do this. Below are a few snippets, showing the two methods to Save Presentation without a prompt. We added a script to our JSL Companion 2nd ed. scripts that discuss our BKM (best known method) for using save presentation and dealing with the scaling issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I need to create a complex PPTX output, I use JSL to create the commands for an extrenal program p3icli, then run it using Run Program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/*
  Save Presentation appends if the file exists. This next line assures that only the current programs requested
  reports are saved. Another option is to add a datetime to the filename for version control.
*/    
	    if( FileExists(usr_aa["pptPath"]), DeleteFile(usr_aa["pptPath"]) );
	    Copy File(templ,usr_aa["pptPath"]);
	    result &amp;lt;&amp;lt; Save Presentation( usr_aa["pptPath"], Insert(2), Outline Titles("BottomRight"), "PNG");
	    wait(2);
	    result &amp;lt;&amp;lt; Close Window(NoSave);
	  )	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or use this syntax&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nme = "c:\temp\ROR Report-" || Format(Today(),"yyyymmdd") ||".pptx";
tjwin &amp;lt;&amp;lt; Save Presentation(nme, Template("$JSL_Companion/ROR_BaseTemplate.pptx"),"PNG" );  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt; P3ICLI (PowerPoint Picture Insert Command Line Interface) is a&lt;BR /&gt;script driven application that inserts user-selected picture and/or graphic files&lt;BR /&gt;into Microsoft PowerPoint (R) slides.&lt;BR /&gt;&lt;BR /&gt;P3ICLI can be downloaded from &lt;U&gt;&lt;STRONG&gt;&lt;A href="https://sourceforge.net/projects/p3icli/" target="_blank"&gt;https://sourceforge.net/projects/p3icli/&lt;/A&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;It documents a JSL example, including the ppt template, JSL script, explanation and resulting&lt;BR /&gt;pptx file at &lt;A href="https://p3icli.sourceforge.io/jsl_example.html" target="_self"&gt;https://p3icli.sourceforge.io/jsl_example.html&lt;/A&gt;. We like the flexibility it offers&lt;BR /&gt;to customize, size, layout, titles and captions. Note: a link to the resulting PPTX is on teh last line of the webpage.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 03:40:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59137#M32523</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-06-04T03:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59183#M32529</link>
      <description>&lt;P&gt;Ms. Morgan,&lt;/P&gt;
&lt;P&gt;Thank you for replying.&lt;/P&gt;
&lt;P&gt;I obviously failed at&amp;nbsp;specifying my question to any degree of coherency. Let me attempt this again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I&amp;nbsp;use the following code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ) );
rbiv = biv &amp;lt;&amp;lt; report;
rbiv &amp;lt;&amp;lt; Save Presentation(  );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it will generate the Bivariate Platform output and then, because the "Save Presentation()" does not have any path/file name specified, JMP very nicely opens up a window that allows the user to navigate to whatever directory they want, and to specify whatever file name they want.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="save.PNG" style="width: 336px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10954iE889A02C64887309/image-dimensions/336x214?v=v2" width="336" height="214" role="button" title="save.PNG" alt="save.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the behavior I want.&amp;nbsp; However, what I need but I can not figure out how to get i is, that after the user click on "Save" and the Bivariate output is saved to the location and file name&lt;/P&gt;
&lt;P&gt;"How to I determine what path/file name the user specified?".&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 11:45:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59183#M32529</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-04T11:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59188#M32532</link>
      <description>&lt;P&gt;I don't see a way to capture the user-selected path/name from JSL.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 14:06:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59188#M32532</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2018-06-04T14:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59234#M32542</link>
      <description>&lt;P&gt;Sorry, Jim.&lt;/P&gt;&lt;P&gt;I thought my interpretation of the question was incongruous with your skills and knowledge.&lt;/P&gt;&lt;P&gt;I asked this once before and find it strange that Save Presentation&amp;nbsp; returns and logs an empty string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many versions of JMP and of Windows OS ago Default Directory seemed to work, but with all the background stuff going on in the PC, JMP changed the behavior of Default Directory. Circa JMP 11, I argued "if the JMP Pick Directory or Save or Open has the last used path, it would be useful to expose that via JSL."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried this before, I looked for a method to send a click to the Select Folder button for Pick Directory.&lt;/P&gt;&lt;P&gt;Something like this since the focus in the Pick Directory Window is on the button Select Folder and the path is the last path chosen.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_xx = Log Capture (Pick Directory() &amp;lt;&amp;lt; Click)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But nothing tried was successful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So a wish list item is that Save Presentation writes the file path to the variable or the log. Since it currently writes a blank string to the log and to a variable xx = (rbiv &amp;lt;&amp;lt; Save Presentation() );&amp;nbsp; it does not seem like a big ask.&amp;nbsp; But better yet offer a&amp;nbsp; JSL function like Get Path("$Last_Path") as a session a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. The example application written for the book has a menu item to Save PowerPoint, so we wrote our own pick directory and file interface for the menu item then used Save Presentation(with the file name).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 15:49:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59234#M32542</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-06-04T15:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59277#M32546</link>
      <description>&lt;P&gt;Hey, JIm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like Pick File() with the Save option is pretty close to what you describe:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rbiv &amp;lt;&amp;lt; Save Presentation( path = Pick File("save", "$TEMP", {"PowerPoint|pptx"}, 1, 1) );
Show( path );
/*:

path = "/C:/Users/wemurp/AppData/Local/Temp/myPowerPoint.pptx";&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 18:46:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59277#M32546</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2018-06-04T18:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a path and filename after Save Presentation() is used with no path specified</title>
      <link>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59281#M32548</link>
      <description>&lt;P&gt;Wendy,&lt;/P&gt;
&lt;P&gt;This is extemely close.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your brilliance&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 19:28:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Retrieving-a-path-and-filename-after-Save-Presentation-is-used/m-p/59281#M32548</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-04T19:28:01Z</dc:date>
    </item>
  </channel>
</rss>

