<?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: ExportToPNG Python Toolbox Tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390809#M30888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dan - that is what I was missing! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2015 20:46:11 GMT</pubDate>
    <dc:creator>RichardMarlow</dc:creator>
    <dc:date>2015-01-20T20:46:11Z</dc:date>
    <item>
      <title>ExportToPNG Python Toolbox Tool</title>
      <link>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390807#M30886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a Python toolbox tool to export layers to PNG. I can get this to work fine in the Python window, but when I try to save this as a toolbox script and set the df_export_width and df_export_height settings as GetParameterAsText inputs the tool keeps crashing out when running from ArcToolbox.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy&lt;/P&gt;&lt;P&gt;... from arcpy import env&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;... dataFrame = arcpy.GetParameterAsText(0)&lt;/P&gt;&lt;P&gt;... outputPNG = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;... dfWidth = arcpy.GetParameterAsText(2)&lt;/P&gt;&lt;P&gt;... dfHeight = arcpy.GetParameterAsText(3)&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;... mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/P&gt;&lt;P&gt;... df = arcpy.mapping.ListDataFrames(mxd, dataFrame)[0]&lt;/P&gt;&lt;P&gt;... arcpy.mapping.ExportToPNG(mxd, outputPNG, df, df_export_width=dfWidth, df_export_height=dfHeight)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the above but with...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... dfWidth = 1600&lt;/P&gt;&lt;P&gt;... dfHeight = 1200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much aprreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 16:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390807#M30886</guid>
      <dc:creator>RichardMarlow</dc:creator>
      <dc:date>2015-01-20T16:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToPNG Python Toolbox Tool</title>
      <link>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390808#M30887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you convert your getparameterastext stuff back to integers? they are text, that is the purpose of that method&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 18:48:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390808#M30887</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-01-20T18:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: ExportToPNG Python Toolbox Tool</title>
      <link>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390809#M30888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dan - that is what I was missing! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 20:46:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporttopng-python-toolbox-tool/m-p/390809#M30888</guid>
      <dc:creator>RichardMarlow</dc:creator>
      <dc:date>2015-01-20T20:46:11Z</dc:date>
    </item>
  </channel>
</rss>

