<?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: Mtext problem in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962280#M122109</link>
    <description>&lt;P&gt;Avoiding the problem by code.&lt;BR /&gt;Have you tried to disable the "Create word-wrap MText" option in the "TXT2MTXT" options?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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-left" image-alt="2017-03-21_19-08-04.png" style="width: 308px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/335883i0D3DCF694391B160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2017-03-21_19-08-04.png" alt="2017-03-21_19-08-04.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-03-21_19-06-42.png" style="width: 279px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/335884i96A8184F10DE962C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2017-03-21_19-06-42.png" alt="2017-03-21_19-06-42.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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 18:16:29 GMT</pubDate>
    <dc:creator>joselggalan</dc:creator>
    <dc:date>2017-03-21T18:16:29Z</dc:date>
    <item>
      <title>Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6961522#M122105</link>
      <description>&lt;P&gt;Good day all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look at the attached picture.&amp;nbsp; Mtext A and B are the same except for their formatting codes.&amp;nbsp; Mtext A has them; B has had them stripped (by exploding the Mtext and then combined using TXT2MTXT).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;am able to identify a carriage returns&amp;nbsp;in Mtext A by identifying the "\\P"s.&amp;nbsp; For Mtext B, however,&amp;nbsp;I am not able to identify the hard carriage return based upon the "\\P", but the Mtext is still displayed as though it has them.&amp;nbsp; This leads me to the assumption that the carriage returns are still stored &lt;EM&gt;somewhere&lt;/EM&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to pull the Mtext apart and&amp;nbsp;assign each line to a variable regardless of the Mtext formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;~Z&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:02:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6961522#M122105</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-03-21T15:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6961586#M122106</link>
      <description>&lt;P&gt;That would be because the original uses &lt;EM&gt;hard returns&lt;/EM&gt; to make new lines, not word wrapping based on the defined Width of its Mtext box [and may not even &lt;EM&gt;have&lt;/EM&gt; any Width defined], whereas the result of TXT2MTXT combining decides on a box width from the selected objects, and the new breakdown into&amp;nbsp;lines&amp;nbsp;is the result of mere word wrapping resulting from that width -- no, the carriage returns are not saved anywhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing you can do is to use the fact that the results&amp;nbsp;from an EXPLODE command &lt;EM&gt;become&lt;/EM&gt; the "Previous" selection set.&amp;nbsp; Immediately after EXPLODE, try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp; texts (ssget "_P")&lt;FONT color="#00ccff"&gt;; the resulting pieces, in a selection set, in order from top to bottom&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; A (cdr (assoc 1 (entget (ssname texts 0))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;B (cdr (assoc 1 (entget (ssname texts 1))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;C (cdr (assoc 1 (entget (ssname texts 2))))&lt;/P&gt;
&lt;P&gt;)&lt;FONT color="#999999"&gt;; setq&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Combine them with TXT2MTXT &lt;EM&gt;after&lt;/EM&gt; doing that, if you still need them combined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That assumes three and only three lines in the source.&amp;nbsp; If there might sometimes be different numbers of lines, that can also be accounted for with a little more sophistication in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Another good reason to do it that way [i.e. &lt;EM&gt;before&lt;/EM&gt; recombining if needed] is that depending on the relative lengths of different lines in the hard-returned version, the breakdown between lines can come out &lt;EM&gt;differently&lt;/EM&gt; in the TXT2MTXTed combination than it was in the original:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TextConversion.PNG" style="width: 338px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/335781i8A0652A0088B04C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="TextConversion.PNG" alt="TextConversion.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I think&amp;nbsp;TXT2MTXT determines the resulting Mtext box width from the &lt;EM&gt;longest&lt;/EM&gt; line among those selected, and since it strings the entire combined content into one line without returns, leaving the line breaks to word wrapping, the shorter pieces in the upper lines in this example get shifted because more of them fit in that width.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:34:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6961586#M122106</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-03-21T15:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6961717#M122107</link>
      <description>&lt;P&gt;Kent,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the quick reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You answered my question.&amp;nbsp; However, your solution&amp;nbsp;isn't an option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like I will need to incorporate additional string recognition into the code to account for the unformatted Mtext that doesn't include hard carriage returns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;~Z&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:48:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6961717#M122107</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-03-21T15:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962079#M122108</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/525418"&gt;@zph&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp; However, your solution&amp;nbsp;isn't an option.&lt;/P&gt;
&lt;P&gt;.... I will need to incorporate additional string recognition ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm curious as to &lt;EM&gt;why&lt;/EM&gt; it's not an option.&amp;nbsp; What are the circumstances?&amp;nbsp; Can they be tweaked in some way to incorporate that approach, by doing something or other in a slightly different order, or something?&amp;nbsp; I can't suggest anything specific without more detail about where this is all coming from, but you might be surprised -- there could be a way around it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it really isn't an option, that additional string recognition would be comparatively simple if you could simply break the resulting string into substrings around spaces [there are several routines around here that will do that].&amp;nbsp; It will be &lt;EM&gt;much trickier&lt;/EM&gt; if something you want saved as a single string includes a space &lt;EM&gt;within&lt;/EM&gt; it, as one does in your example.&amp;nbsp; It may be possible if you can define only &lt;EM&gt;limited&lt;/EM&gt; possible circumstances, such as that any &lt;EM&gt;single&lt;/EM&gt;-letter "word" in the string should &lt;EM&gt;always&lt;/EM&gt; be combined with the word before it, but that depends on the possible configurations of the pieces you will encounter.&amp;nbsp; Those are some of the reasons&amp;nbsp;why the save-the-variables-before-recombining approach would be so much simpler, if there's some way to make it possible.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 17:15:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962079#M122108</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-03-21T17:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962280#M122109</link>
      <description>&lt;P&gt;Avoiding the problem by code.&lt;BR /&gt;Have you tried to disable the "Create word-wrap MText" option in the "TXT2MTXT" options?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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-left" image-alt="2017-03-21_19-08-04.png" style="width: 308px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/335883i0D3DCF694391B160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2017-03-21_19-08-04.png" alt="2017-03-21_19-08-04.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-03-21_19-06-42.png" style="width: 279px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/335884i96A8184F10DE962C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2017-03-21_19-06-42.png" alt="2017-03-21_19-06-42.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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 18:16:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962280#M122109</guid>
      <dc:creator>joselggalan</dc:creator>
      <dc:date>2017-03-21T18:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962410#M122110</link>
      <description>&lt;P&gt;Sure; in a nutshell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This portion of code will reside in a routine that&amp;nbsp;will be pulling data based upon a rather large selection set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The user will&amp;nbsp;identify the area of the drawing to pull data from by&amp;nbsp;defining a crossing window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There will be no user interaction from that point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The routine will interpret&amp;nbsp;formatted AND unformatted values of&amp;nbsp;Mtext entities&amp;nbsp;resulting from&amp;nbsp;this selection set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 18:57:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962410#M122110</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-03-21T18:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962678#M122111</link>
      <description>&lt;P&gt;joselggalan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While your reply doesn't provide a possible solution to my problem, I was not aware of the options within TXT2MTXT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the information!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;~Z&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 20:39:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962678#M122111</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-03-21T20:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962703#M122112</link>
      <description>&lt;P&gt;That doesn't really tell me enough to understand why it can't pull the string content out of the pieces after Exploding and before re-assembling, as opposed to [for example, if&amp;nbsp;it&amp;nbsp;re-assembles the no-format pieces using&amp;nbsp;the don't-word-wrap option in TXT2MTXT] subdividing around \\P elements, or something.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 20:51:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6962703#M122112</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-03-21T20:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6964279#M122113</link>
      <description>&lt;P&gt;This routine will only read the Mtext entities, not modify them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will need to be able to effectively handle unformatted and formatted Mtext values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I only added the statement pertaining how the Mtext entities became unformatted (exploding to TXT2MTEXT) because I was thinking it may help in identifying an answer to the absence of the "\\P" in the Mtext value.&amp;nbsp; I didn't realize&amp;nbsp;the&amp;nbsp;Mtext value&amp;nbsp;was 'word-wrapping'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:55:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6964279#M122113</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-03-22T12:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6964841#M122114</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/525418"&gt;@zph&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;This routine will only read the Mtext entities, not modify them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will need to be able to effectively handle unformatted and formatted Mtext values.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So&amp;nbsp;you may have some that have multiple lines&amp;nbsp;&lt;EM&gt;via&lt;/EM&gt; hard returns, and some that have them&amp;nbsp;as a result of&amp;nbsp;word wrapping, and some that might have things like font and/or color and/or size and/or other formatting within them, and what you want is to extract each line without formatting and save it into a text-string variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can dump all internal formatting with a routine called StripMtext, links for which you can find with a Search.&amp;nbsp; That could presumably be modified to take the color/font/etc. formatting out of just the string content pulled from one, without modifying the Mtext object itself.&amp;nbsp; Then there are routines that will break a string apart around any kind of delimiter you want to specify, in this case presumably the \\P for those that use hard returns, and you could thereby get the unformatted content of each line.&amp;nbsp; But that won't get you the breakdown between lines when that comes from word wrapping.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect the easiest thing to do would be to have a routine &lt;EM&gt;make a copy&lt;/EM&gt; of&amp;nbsp;the Mtext object, Explode&amp;nbsp;the copy&amp;nbsp;and&amp;nbsp;put the contents into variables as in Post 2, and then get rid of the temporary pieces from the copy.&amp;nbsp; That would handle the breakdown into lines correctly no matter how it's arrived at, &lt;EM&gt;and&lt;/EM&gt; eliminate all formatting.&amp;nbsp; Does that sound viable?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 15:15:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6964841#M122114</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-03-22T15:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6965570#M122115</link>
      <description>&lt;P&gt;Here is the portion of code that pertains to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(setq ss3 (ssget "_C" 
		(list (car pt3) (- (cadr pt4) 0.5)) 
		pt4 
			'((0 . "MTEXT")(8 . "TEXT"))))

(setq eQd (cdr (assoc 1 (entget (ssname ss3 0)))))
(setq dLen (strlen eQd) i 0 iR ())	

(if (= (vl-string-search "\\P" eQd 0) nil)
	(progn
		(cond
			((/= (vl-string-search "P/P" eQd 0) nil)
				(setq 	hNL (vl-string-search "P/P" eQd 0)
					MISC "nil"
					HN (substr eQd 1 (+ hNL 3))
					EL (substr eQd (+ hNL 5)))
			)

			((/= (vl-string-search "PATCH PANEL" eQd 0) nil)
				(setq 	hNL (vl-string-search "PATCH PANEL" eQd 0)
					MISC "nil"
					HN (substr eQd 1 (+ hNL 11))
					EL (substr eQd (+ hNL 13)))
			)

			(T
				(foreach cZ cZiD
					(if (/= (vl-string-search cZ eQd 0) nil)
						(progn
						(setq hNL (vl-string-search cZ eQd 0) HN "")

						(if (&amp;gt; hNL 0)
						(setq i (1+ hNL) MISC (substr eQd 1 (1- hNL)))
						(setq i 1 MISC "nil")
						) ;if

						(while (/= (substr eQd i 1) " ")
						(setq HN (strcat HN (substr eQd i 1)) i (1+ i))
						) ;while

						(setq EL (substr eQd (1+ i)))
						) ;progn
					) ;if
				) ;foreach
			)
		) ;cond
	) ;progn

	(progn
		(while (&amp;lt;= i dLen)
			(if (/= (vl-string-search "\\P" eQd i) nil)
			(setq iR (cons (vl-string-search "\\P" eQd i) iR))
			) ;if
		(setq i (1+ i))
		) ;while

	(setq iR (vl-sort iR '&amp;lt;) i 0 iT 1 dList ())

		(while (&amp;lt;= i (length iR))
		(setq iD (nth i iR))

			(cond 
				((= i 0)
					(setq dList (cons (list (substr eQd iT iD)) dList) iT iD)
				)

				((&amp;lt; i (length iR))
					(setq dList (cons (list (substr eQd (+ iT 2) (- (- iD iT) 1))) dList) iT iD)
				)

				((= i (length iR))
					(setq dList (cons (list (substr eQd (+ iT 3))) dList))
				)
			) ;cond

		(setq i (1+ i))
		) ;while

	(setq dList (reverse dList) fList ())

		(foreach dL dList
			(if (/= (vl-string-search "{" (car dL)) nil)
				(setq 	sCo (vl-string-search ";" (car dL))
					newV (substr (car dL) (+ sCo 2) (- (strlen (car dL)) (+ sCo 2)))
					fList (cons (list newV) fList))

				(setq fList (cons (list (car dL)) fList))
			) ;if	
		) ;foreach

	(setq fList (reverse fList))

		(cond
			((= (length fList) 1) (setq MISC (car (nth 0 fList)) HN "nil" EL "nil"))
			((= (length fList) 2) (setq MISC "nil" HN (car (nth 0 fList)) EL (car (nth 1 fList))))
			((= (length fList) 3) (setq MISC (car (nth 0 fList)) HN (car (nth 1 fList)) EL (car (last fList))))
		) ;cond
	) ;progn
) ;if&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 18:45:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/6965570#M122115</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-03-22T18:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Mtext problem</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/7304690#M122116</link>
      <description>&lt;P&gt;Kent,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After months of successfully tweaking to accommodate formatting codes, I realize that I needed to change the way I was handling this portion of code.&amp;nbsp; Your idea about copying the mtext entity, exploding the copy, and capturing the individual text entity values and then deleting those entities was spot on.&amp;nbsp; I have since integrated this method into the routine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't regret dealing/working with the formatting codes - I learned a lot and it was fun.&amp;nbsp; However, the routine needs to be at a state where I am not needing to&amp;nbsp;repeatedly dive back into the code and&amp;nbsp;changing it based upon circumstances that are outside of my control.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, Kent!&lt;/P&gt;
&lt;P&gt;~Z&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 13:47:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-problem/m-p/7304690#M122116</guid>
      <dc:creator>zph</dc:creator>
      <dc:date>2017-08-16T13:47:03Z</dc:date>
    </item>
  </channel>
</rss>

