<?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: arcpy.AddMessage does not produce newlines in ArcGIS Pro? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92054#M7183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To make it work in both ArcMap and Pro, just make it a Unicode literal:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;u&lt;SPAN class="string token"&gt;"\u200B"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; ‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2020 21:32:37 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-05-04T21:32:37Z</dc:date>
    <item>
      <title>arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92050#M7179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;I am working with ArcGIS Pro v2.4.1, and am trying to produce&amp;nbsp;newlines using arcpy.AddMessage when running a script tool.&lt;/SPAN&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&amp;nbsp;I just&amp;nbsp;want to create some blank spaces between messages, but none of the following seem to work when running the tool in ArcGIS Pro:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&lt;SPAN&gt;arcpy.AddMessage("\n")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&lt;SPAN&gt;arcpy.AddMessage("")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&lt;SPAN style="background-color: #f9f8f6; "&gt;arcpy.AddMessage(" ")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&lt;SPAN style="background-color: #f9f8f6; "&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, these do work when running the tool in ArcMap. Is there a reason why these might not work&amp;nbsp;in&amp;nbsp;ArcGIS Pro?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 06:19:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92050#M7179</guid>
      <dc:creator>GB_MattPanunto_GISS</dc:creator>
      <dc:date>2020-05-04T06:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92051#M7180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is getting ignored or "trimmed".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested this code&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"first line"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"\n "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"second line"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"first line\nsecond line"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and got this output&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/490827_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;So you might need to use an additional character to create a spacing between output lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92051#M7180</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2021-12-10T23:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92052#M7181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see the same thing as &lt;A href="https://community.esri.com/migrated-users/20360"&gt;FC Basson&lt;/A&gt;‌ with Pro 2.5.&amp;nbsp; Personally, I would consider this a defect on Esri's part, but maybe they would consider it an 'enhancement' with Pro! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested a few white-space and control characters and all were getting stripped, but I did find that a zero-width space ('\u200B') works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 14:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92052#M7181</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-05-04T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92053#M7182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good find! The '\u200B' seems to be working for me as well, but only for ArcGIS Pro, not ArcMap, ugh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess inserting this line will provide a space in both environments:&lt;/P&gt;&lt;P&gt;arcpy.AddMessage("\u200B" if (sys.version_info[0] == 3) else "\n")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 20:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92053#M7182</guid>
      <dc:creator>GB_MattPanunto_GISS</dc:creator>
      <dc:date>2020-05-04T20:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92054#M7183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To make it work in both ArcMap and Pro, just make it a Unicode literal:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;u&lt;SPAN class="string token"&gt;"\u200B"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; ‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 21:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92054#M7183</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-05-04T21:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92055#M7184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh yes, perfect!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2020 02:56:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92055#M7184</guid>
      <dc:creator>GB_MattPanunto_GISS</dc:creator>
      <dc:date>2020-05-09T02:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AddMessage does not produce newlines in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92056#M7185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice find Joshua!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2020 17:02:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-addmessage-does-not-produce-newlines-in/m-p/92056#M7185</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2020-05-09T17:02:17Z</dc:date>
    </item>
  </channel>
</rss>

