<?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: New Line Character - Arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542076#M42323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked like a charm!! Thanks Curtis, it was the piece I was missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Sep 2014 20:35:58 GMT</pubDate>
    <dc:creator>JorgeOrellana</dc:creator>
    <dc:date>2014-09-11T20:35:58Z</dc:date>
    <item>
      <title>New Line Character - Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542073#M42320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my current issue, I am writting a Python script that will update my map title on a large amount of MXDs in a folder. If I hard code my text update it will work. For example if i set (hard code my text property)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elem.txt = """&amp;lt;FNT size="11.5"&amp;gt;Project Title 1\r\nProject Title 2&amp;lt;/FNT&amp;gt;\r\nMap of Property\r\n&amp;lt;dyn type= "page" property="Map_ID"/&amp;gt;"""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my MXDs updates with no issues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the end result is to be able to turn my script into a Toolbox where the user can enter the updated text&amp;nbsp; as needed. However when I enter the same text into my Toolbox and run the script my MXD formatting is off. i.e. the new line character is no longer inserted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have an idea on how I can do this in the Toolbox so it doesn't throw my formatting off?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 16:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542073#M42320</guid>
      <dc:creator>JorgeOrellana</dc:creator>
      <dc:date>2014-09-11T16:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: New Line Character - Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542074#M42321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's see the Toolbox code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 16:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542074#M42321</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2014-09-11T16:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: New Line Character - Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542075#M42322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that parameters are usually passed in GP using a string representation so your newline is not getting across unmolested. I have run into this with the Calculate Value tool, where I have had to use chr(10) instead of&amp;nbsp; "\n".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An approach that may work would be to instruct the user to insert a normal character ("@" for example) and replace it with the real deal in Python:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14104621840966981 jive_text_macro" jivemacro_uid="_14104621840966981"&gt;
&lt;P&gt;title = title.replace("@", "\n")&lt;/P&gt;
&lt;P&gt;title = title.replace("@", chr(10))&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 19:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542075#M42322</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-09-11T19:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: New Line Character - Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542076#M42323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked like a charm!! Thanks Curtis, it was the piece I was missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 20:35:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/new-line-character-arcpy/m-p/542076#M42323</guid>
      <dc:creator>JorgeOrellana</dc:creator>
      <dc:date>2014-09-11T20:35:58Z</dc:date>
    </item>
  </channel>
</rss>

