<?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 View exported file from Python Toolbox? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034028#M60289</link>
    <description>&lt;P&gt;I've noticed that when you export a layout to PDF in Pro, it gives you a handy option to "View exported file."&amp;nbsp; Is there a way to add this prompt for a file generated from a Python toolbox?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7831iBC106554B9FBD34E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 17:29:08 GMT</pubDate>
    <dc:creator>MichaelMorisette</dc:creator>
    <dc:date>2021-03-08T17:29:08Z</dc:date>
    <item>
      <title>View exported file from Python Toolbox?</title>
      <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034028#M60289</link>
      <description>&lt;P&gt;I've noticed that when you export a layout to PDF in Pro, it gives you a handy option to "View exported file."&amp;nbsp; Is there a way to add this prompt for a file generated from a Python toolbox?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7831iBC106554B9FBD34E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 17:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034028#M60289</guid>
      <dc:creator>MichaelMorisette</dc:creator>
      <dc:date>2021-03-08T17:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: View exported file from Python Toolbox?</title>
      <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034035#M60291</link>
      <description>&lt;P&gt;they aren't part of a tools parameeters&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layout-class.htm" target="_blank"&gt;Layout—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;exportToPNG (out_png, {resolution}, {color_mode}, {transparent_background}, {embed_color_profile}, {clip_to_elements})&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 17:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034035#M60291</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-08T17:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: View exported file from Python Toolbox?</title>
      <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034038#M60292</link>
      <description>&lt;P&gt;I've tried adding links via &lt;STRONG&gt;AddMessage&lt;/STRONG&gt; and &lt;STRONG&gt;SetProgressorLabel&lt;/STRONG&gt;, but the resulting link isn't a "live" hyperlink, whether to a URL or a file.&lt;/P&gt;&lt;P&gt;Getting a "completion" message to show up is probably something that would need to be done via the Pro SDK, rather than from a Python script. It would be a really great feature, though!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 17:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034038#M60292</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-08T17:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: View exported file from Python Toolbox?</title>
      <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034089#M60297</link>
      <description>&lt;P&gt;You could set a boolean parameter named 'View exported file' in your tool, and then at the end of your script you set a conditional that checks if the boolean is true or false and do an os.startfile('exported path') if its true.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 12:29:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034089#M60297</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-09T12:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: View exported file from Python Toolbox?</title>
      <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034165#M60298</link>
      <description>&lt;P&gt;This did the trick!&amp;nbsp; Thanks.&amp;nbsp; I found os.open() didn't seem to work, but os.startfile() did what I needed instead.&lt;/P&gt;&lt;P&gt;# Open the PDF if the user wanted to&lt;BR /&gt;if parameters[2].valueAsText == "true":&lt;BR /&gt;os.startfile(pdfFile)&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 21:12:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034165#M60298</guid>
      <dc:creator>MichaelMorisette</dc:creator>
      <dc:date>2021-03-08T21:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: View exported file from Python Toolbox?</title>
      <link>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034401#M60306</link>
      <description>&lt;P&gt;Yikes! My bad on that one- thanks for catching it.&amp;nbsp; I had C#'s File.Open stuck on the brain for opening files.&lt;/P&gt;&lt;P&gt;I updated the post with your correction.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 12:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/view-exported-file-from-python-toolbox/m-p/1034401#M60306</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-09T12:28:16Z</dc:date>
    </item>
  </channel>
</rss>

