<?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: Mysterious :-) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/mysterious/m-p/111926#M8730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide a link to where you found this code snippet, and why you might think this might work recursively?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you got the code from the &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000037000000" rel="nofollow noopener noreferrer" target="_blank"&gt;PrintMap &lt;/A&gt;help page, example two, it says that this only prints the first data frame ([0]). If you want to loop through all data frames, use a for loop and change the df variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; arcpy&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;mxd = arcpy.mapping.MapDocument(r&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"path"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;dfs = arcpy.mapping.ListDataFrames(mxd)&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;for df in dfs:&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.PrintMap(mxd, r&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"printer"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, df)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;If this isn't what you're asking, please try rephrasing your question.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:42:18 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2021-12-11T06:42:18Z</dc:date>
    <item>
      <title>Mysterious :-)</title>
      <link>https://community.esri.com/t5/python-questions/mysterious/m-p/111923#M8727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mysterious &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can it be that this code produces something like multiple recursive printing of the map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r"path")
df = arcpy.mapping.ListDataFrames(mxd)[0]
arcpy.mapping.PrintMap(mxd, r"printer", df)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:42:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mysterious/m-p/111923#M8727</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2021-12-11T06:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Mysterious :-)</title>
      <link>https://community.esri.com/t5/python-questions/mysterious/m-p/111924#M8728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;The DataFrame object is also used as an optional parameter to distinguish printing or export a data frame versus a page layout. For this reason it is important to uniquely name each data frame so a specific data frame can be easily referenced.&amp;nbsp; &lt;/EM&gt;From the help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are your data frame names?&amp;nbsp; are they all unique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 08:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mysterious/m-p/111924#M8728</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-05T08:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Mysterious :-)</title>
      <link>https://community.esri.com/t5/python-questions/mysterious/m-p/111925#M8729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now they are two and different?&lt;/P&gt;&lt;P&gt;Layer and NewDataFrame&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 12:12:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mysterious/m-p/111925#M8729</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2015-10-05T12:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Mysterious :-)</title>
      <link>https://community.esri.com/t5/python-questions/mysterious/m-p/111926#M8730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide a link to where you found this code snippet, and why you might think this might work recursively?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you got the code from the &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000037000000" rel="nofollow noopener noreferrer" target="_blank"&gt;PrintMap &lt;/A&gt;help page, example two, it says that this only prints the first data frame ([0]). If you want to loop through all data frames, use a for loop and change the df variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; arcpy&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;mxd = arcpy.mapping.MapDocument(r&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"path"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;dfs = arcpy.mapping.ListDataFrames(mxd)&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;for df in dfs:&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.PrintMap(mxd, r&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"printer"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, df)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;If this isn't what you're asking, please try rephrasing your question.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:42:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mysterious/m-p/111926#M8730</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T06:42:18Z</dc:date>
    </item>
  </channel>
</rss>

