<?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: Mathcad Prime Python Scripts - New Line in text files causes a crash in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056889#M220631</link>
    <description>&lt;P&gt;I also did a BeyondCompare of two Mathcad Prime XML files. The file on the left has a new line in the text region and the file on the right does not have a new line in the text region.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The actual height is larger for the file on the left since it has the new line, but otherwise everything else is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see the text item-idref is different between the two files. What is that used for? Is that where text data in the actual Mathcad Prime files is stored?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not a software person so excuse my ignorance,&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Mar 2026 14:29:39 GMT</pubDate>
    <dc:creator>TC_10696099</dc:creator>
    <dc:date>2026-03-03T14:29:39Z</dc:date>
    <item>
      <title>Mathcad Prime Python Scripts - New Line in text files causes a crash</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056885#M220630</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use Python to extract data from Mathcad Prime files, based on the previous post below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing I noticed is that our Python tool will crash when you have a new line in a text region. Getting rid of the new line in the text region gets rid of the crashing issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I go into the Mathcad .zip file with all of the XML data, I do not see any difference between two files - one with text with a new line and one&amp;nbsp; with no new line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where would I find the new line data in the text region? I will update the Python code to catch new lines, but I dont even see where the new lines are in the text region.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TC_10696099_0-1772546868639.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/135266i4B8074F6E8D51EDF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TC_10696099_0-1772546868639.png" alt="TC_10696099_0-1772546868639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TC_10696099_1-1772546874776.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/135267i295EA459DD0A5A42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TC_10696099_1-1772546874776.png" alt="TC_10696099_1-1772546874776.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.ptc.com/t5/Mathcad/Mathcad-Prime-9-0-Scripting-with-XML-Data/td-p/903161" target="_blank" rel="noopener"&gt;Mathcad Prime 9.0 Scripting with XML Data - PTC Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 14:10:34 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056885#M220630</guid>
      <dc:creator>TC_10696099</dc:creator>
      <dc:date>2026-03-03T14:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Mathcad Prime Python Scripts - New Line in text files causes a crash</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056889#M220631</link>
      <description>&lt;P&gt;I also did a BeyondCompare of two Mathcad Prime XML files. The file on the left has a new line in the text region and the file on the right does not have a new line in the text region.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The actual height is larger for the file on the left since it has the new line, but otherwise everything else is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see the text item-idref is different between the two files. What is that used for? Is that where text data in the actual Mathcad Prime files is stored?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not a software person so excuse my ignorance,&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 14:29:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056889#M220631</guid>
      <dc:creator>TC_10696099</dc:creator>
      <dc:date>2026-03-03T14:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Mathcad Prime Python Scripts - New Line in text files causes a crash</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056893#M220632</link>
      <description>&lt;P&gt;When you unzip a mcdx file you should see a directory \mathcad\xaml&lt;/P&gt;
&lt;P&gt;In this directory you will find some files named FlowDocument0.XamlPackage,&amp;nbsp; FlowDocument1.XamlPackage, etc.&lt;/P&gt;
&lt;P&gt;Each text region has its own file here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The numbers these FlowDoucument#.XamlPackage file seem to correspond with the region-id given in worksheet.xml, but to be on the safe side you should look at _rels\worksheet.xml.rels where you can see which&amp;nbsp;FlowDoucument#.XamlPackage corresponds to which irem-idref given in worksheet.xml.&lt;/P&gt;
&lt;P&gt;These&amp;nbsp;FlowDoucument#.XamlPackage files are once again renamed zip-files! If you unzip them you should see a directory Xaml and inside&amp;nbsp; a file Document.xaml. This file contains among others the actual text of the text region.&lt;/P&gt;
&lt;P&gt;Each line of text is enclosed within &amp;lt;Run style ....&amp;gt; ... &amp;lt;/Run&amp;gt; tags and for an empty line the closing &amp;lt;/Run&amp;gt; immediately follows the opening &amp;lt; Run ....&amp;gt; without any text in-between.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 16:16:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Mathcad-Prime-Python-Scripts-New-Line-in-text-files-causes-a/m-p/1056893#M220632</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2026-03-03T16:16:17Z</dc:date>
    </item>
  </channel>
</rss>

