<?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: Split MTEXT into separate MTEXT by words. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508900#M18858</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;....&lt;SPAN&gt;&amp;nbsp;I'm having a hard time imagining how the resulting individual-word objects could be positioned for the "same look." ....&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;[EDIT -- Message 9 arrived while I was writing this, and what it's talking about is less complex in some ways, but most principles could still apply....]&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Actually, I'm starting to imagine that it might be possible, at least with some conditions.&amp;nbsp; The critical thing I'm finding is that the bounding box of Mtext "reaches" leftward to encompass&amp;nbsp;&lt;EM&gt;leading&lt;/EM&gt; spaces if present, in contrast to the fact that [for whatever reason] it does &lt;EM&gt;not&lt;/EM&gt; "reach" rightward to encompass &lt;EM&gt;trailing&lt;/EM&gt; spaces.&amp;nbsp; So:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; divide up the Mtext's content at the spaces, &lt;EM&gt;keeping each space&lt;/EM&gt; as part of the string of the following word;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; divide at any hard or soft returns, with some encoding of their presence to cover line breaks that are not just the result of word-wrapping;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; put in individual Mtext objects for each word, individually set to zero defined width, positioning them by their bounding boxes which [after the first] will include the spacing from the previous one;&lt;/P&gt;
&lt;P&gt;4.. watch for when one would overshoot the source Mtext's right-most extent, and if it would, go to the next line.&amp;nbsp; The line spacing for moving down to the next can be calculated from the source Mtext's entity data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's the question of the position of the first word on each line after the first, if its bounding box includes a space that you wouldn't want at the beginning of the line.&amp;nbsp; It should be possible to determine that a word would overshoot the right side, and if so, to not just go down to a next line, but to first &lt;EM&gt;remove the space&lt;/EM&gt; and re-establish the bounding box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that might not be too hard for Top-Left-justified Mtext at "Exactly" line-spacing style.&amp;nbsp; If this is all bounding-box-based, it turns out that bounding boxes do &lt;EM&gt;not&lt;/EM&gt; account for taller-than-capitals [in some fonts] characters like | / ( ), which are the things that stretch the line spacing under "At Least" spacing style.&amp;nbsp; I'm not sure how one could account for that kind of line spacing variation, since how much taller those characters are is buried in the font definition, and not available from something like entity data.&amp;nbsp; And at the time a new line is started, it wouldn't know whether a taller object might be coming farther along on that same line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Working from other source-Mtext justifications could be rather complicated, but may be possible.&amp;nbsp; For right justifications it would presumably involve Moving a &lt;EM&gt;whole line's worth&lt;/EM&gt; of words leftward as each word is added.&amp;nbsp; Likewise for bottom justifications, Moving whole lines upward as each new line is started, etc.&amp;nbsp; Non-zero rotations would further complicate things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Internal formatting such as color and font and size changes would get messed up unless they apply only to a single word, with their coding fully contained between the spaces around that word.&amp;nbsp; Whether to STRIP all internal formatting first would be a question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, something to think about....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2024 17:34:35 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2024-01-19T17:34:35Z</dc:date>
    <item>
      <title>Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12506793#M18849</link>
      <description>&lt;P&gt;Is there a way or lsp to simply split selected single (or multiple) MTEXT objects into individual MTEXT objects by words? Have the same look but be individual MTEXT objects with one word in each MTEXT object.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 20:28:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12506793#M18849</guid>
      <dc:creator>ChrisWebster</dc:creator>
      <dc:date>2024-01-18T20:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12506817#M18850</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/783594"&gt;@ChrisWebster&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Have the same look but ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You mean in the same visual arrangement in the drawing, so a sentence and/or a paragraph will still read as the single source Mtext did?&amp;nbsp; Wow....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are various routines out there to subdivide text string content into separate strings around whatever delimiting character(s) you want [presumably a space in this case], but I'm having a hard time imagining how the resulting individual-word objects could be positioned for the "same look."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[And I confess to being curious:&amp;nbsp; what would be the &lt;EM&gt;purpose&lt;/EM&gt; of doing this?]&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 20:41:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12506817#M18850</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-18T20:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12506993#M18851</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/783594"&gt;@ChrisWebster&lt;/a&gt;&amp;nbsp;Sort of like when you EXPLODE an MTEXT but the results are each an MTEXT instead of TEXT?&lt;/P&gt;
&lt;P&gt;Or are you thinking of some other process ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 22:23:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12506993#M18851</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-01-18T22:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12507037#M18852</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;And the explosion creates separate lines of text for each line of mtext, not separate words, unless of course there was just one word on each line.&amp;nbsp; But that's a nightmare if he thinks all the words are going to end up in the same position before being chopped up.&amp;nbsp; Yeah, of course we could take a hack at it (pun intended), but I can't conceive of the purpose.&amp;nbsp; Maybe he wants to select certain words to change their color or style, but the mtext editor provides that capability and will adjust the spacing with following words if the change creates a different width.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 22:49:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12507037#M18852</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-01-18T22:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12507393#M18853</link>
      <description>&lt;P&gt;My $0.05 is he trying to make columns out of the mtext so using tabs would fix, now where is that post about removing tabs from the other day.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 03:46:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12507393#M18853</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-01-19T03:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508305#M18854</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;And the explosion creates separate lines of text for each line of mtext, not separate words, unless of course there was just one word on each line.&amp;nbsp; But that's a nightmare if he thinks all the words are going to end up in the same position before being chopped up.&amp;nbsp; Yeah, of course we could take a hack at it (pun intended), but I can't conceive of the purpose.&amp;nbsp; Maybe he wants to select certain words to change their color or style, but the mtext editor provides that capability and will adjust the spacing with following words if the change creates a different width.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Agreed: the OP will need to chime in to answer these questions and to share their most common example MTEXTs.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 13:44:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508305#M18854</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-01-19T13:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508584#M18855</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What I got out of the other post is that removing the tabs "\t" is easy but the tab stop definitions are a bit challenging.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 15:27:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508584#M18855</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-01-19T15:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508706#M18856</link>
      <description>&lt;P&gt;DELETE!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 15:40:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508706#M18856</guid>
      <dc:creator>mcweb</dc:creator>
      <dc:date>2024-01-19T15:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508816#M18857</link>
      <description>&lt;P&gt;I have lots of spaced-out mtext objects (street, route, road, highway names) that I want to use background mask on. But I don't want to mask the spaces. I am manually editing them - copy for each word, editing each item, masking. On the left before, right after I manually editing.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="temp.jpg" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1316189iF697430328E3EF10/image-size/medium?v=v2&amp;amp;px=400" role="button" title="temp.jpg" alt="temp.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 16:26:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508816#M18857</guid>
      <dc:creator>ChrisWebster</dc:creator>
      <dc:date>2024-01-19T16:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508900#M18858</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;....&lt;SPAN&gt;&amp;nbsp;I'm having a hard time imagining how the resulting individual-word objects could be positioned for the "same look." ....&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#00CCFF"&gt;[EDIT -- Message 9 arrived while I was writing this, and what it's talking about is less complex in some ways, but most principles could still apply....]&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Actually, I'm starting to imagine that it might be possible, at least with some conditions.&amp;nbsp; The critical thing I'm finding is that the bounding box of Mtext "reaches" leftward to encompass&amp;nbsp;&lt;EM&gt;leading&lt;/EM&gt; spaces if present, in contrast to the fact that [for whatever reason] it does &lt;EM&gt;not&lt;/EM&gt; "reach" rightward to encompass &lt;EM&gt;trailing&lt;/EM&gt; spaces.&amp;nbsp; So:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; divide up the Mtext's content at the spaces, &lt;EM&gt;keeping each space&lt;/EM&gt; as part of the string of the following word;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; divide at any hard or soft returns, with some encoding of their presence to cover line breaks that are not just the result of word-wrapping;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; put in individual Mtext objects for each word, individually set to zero defined width, positioning them by their bounding boxes which [after the first] will include the spacing from the previous one;&lt;/P&gt;
&lt;P&gt;4.. watch for when one would overshoot the source Mtext's right-most extent, and if it would, go to the next line.&amp;nbsp; The line spacing for moving down to the next can be calculated from the source Mtext's entity data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's the question of the position of the first word on each line after the first, if its bounding box includes a space that you wouldn't want at the beginning of the line.&amp;nbsp; It should be possible to determine that a word would overshoot the right side, and if so, to not just go down to a next line, but to first &lt;EM&gt;remove the space&lt;/EM&gt; and re-establish the bounding box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that might not be too hard for Top-Left-justified Mtext at "Exactly" line-spacing style.&amp;nbsp; If this is all bounding-box-based, it turns out that bounding boxes do &lt;EM&gt;not&lt;/EM&gt; account for taller-than-capitals [in some fonts] characters like | / ( ), which are the things that stretch the line spacing under "At Least" spacing style.&amp;nbsp; I'm not sure how one could account for that kind of line spacing variation, since how much taller those characters are is buried in the font definition, and not available from something like entity data.&amp;nbsp; And at the time a new line is started, it wouldn't know whether a taller object might be coming farther along on that same line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Working from other source-Mtext justifications could be rather complicated, but may be possible.&amp;nbsp; For right justifications it would presumably involve Moving a &lt;EM&gt;whole line's worth&lt;/EM&gt; of words leftward as each word is added.&amp;nbsp; Likewise for bottom justifications, Moving whole lines upward as each new line is started, etc.&amp;nbsp; Non-zero rotations would further complicate things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Internal formatting such as color and font and size changes would get messed up unless they apply only to a single word, with their coding fully contained between the spaces around that word.&amp;nbsp; Whether to STRIP all internal formatting first would be a question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, something to think about....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 17:34:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12508900#M18858</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-19T17:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509384#M18859</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/783594"&gt;@ChrisWebster&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;That's a pretty good idea.&amp;nbsp; Of course you should have labeled the road names with separate pieces of text in the first place.&amp;nbsp; I don't have it installed but isn't there a TXTEXPLD (sp?)&amp;nbsp; in Express Tools?&lt;/P&gt;&lt;P&gt;If so, I think you could explode all the mtext labels into text objects (one for each line), then TXTXPLD (sp?) all the text objects into separate words, then convert all the text to mtext and then apply the background masks.&amp;nbsp; That could probably be all wrapped up into one lisp command, with the only snag of having to select all the candidates.&amp;nbsp; But grabbing one and applying SelectSimilar might do the job (hopefully they are all on the same layer).&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 21:43:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509384#M18859</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-01-19T21:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509778#M18860</link>
      <description>&lt;P&gt;Hi John TXTEXP. Then yes get each text and convert to mtext with a mask. Using VL Backgroundfill.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 04:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509778#M18860</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-01-20T04:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509787#M18861</link>
      <description>&lt;P&gt;TXTEXP explodes text and mtext into polylines?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 04:39:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509787#M18861</guid>
      <dc:creator>mcwebster</dc:creator>
      <dc:date>2024-01-20T04:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509798#M18862</link>
      <description>&lt;P&gt;Was about to respond to John yes goes to far dont use.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 04:53:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509798#M18862</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-01-20T04:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509816#M18863</link>
      <description>&lt;P&gt;Try this it will not align 100% but should be close enough, uses space as the delimiter between words.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; Take mtext read it as words and add a mtext with box around each word
; By alanH Jan 2024

(defun c:mt-words-box ( / M-Text-mask _csv-&amp;gt;lst32 ss obj str lay ht pt rot sty lst val)
 
(defun M-Text-mask (pt str)
(entmakex (list
(cons 0 "MTEXT")         
(cons 100 "AcDbEntity")
(cons 100 "AcDbMText")
(cons 10 pt)
(cons 8 lay)
(cons 1 str)
(cons 7 sty)
(cons 90 1) 
(cons 63 1) ; colour
(cons 45 1.2) ; gap
(cons 441 0)
))
)

; thanks to Lee-mac for the csv-lst

(defun _csv-&amp;gt;lst32 ( str / pos )
	(if (setq pos (vl-string-position 32 str))
		(cons (substr str 1 pos) (_csv-&amp;gt;lst32 (substr str (+ pos 2))))
		(list str)
    )
)

(prompt "select mtext to have mask ")
(setq ss (ssget '((0 . "MTEXT"))))

(if (= ss nil)
(progn (Alert "No Mtext selected \n\n Will exit try again")(exit))
)

(repeat (setq x (sslength ss))
  (setq obj (vlax-ename-&amp;gt;vla-object (ssname ss (setq x (1- x)))))

  (setq str (vlax-get obj 'textstring))
  (setq lay (vlax-get obj 'layer))
  (setq pt (vlax-get obj 'insertionpoint))
  (setq ht (vlax-get obj 'Height))
  (setq rot (vlax-get obj 'rotation))
  (setq sty (vlax-get obj 'stylename))
  
  (setq lst ())
  (setq lst (_csv-&amp;gt;lst32 str))

  (foreach val lst
    (M-Text-mask pt val)
    (setq len (* ht (+ 1 (strlen val))))
    (setq pt (polar pt rot len))
  )
)

(command "erase" ss "")

(princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 20 Jan 2024 05:23:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12509816#M18863</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-01-20T05:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12512011#M18864</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/783594"&gt;@ChrisWebster&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I've got the fist part working; no explosions.&amp;nbsp; The plan is to dissect the parts and put the non-blank pieces pretty much where they were based on the angle of the mtext and length of the spaces between.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 23:42:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12512011#M18864</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-01-21T23:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12512593#M18865</link>
      <description>&lt;P&gt;Have you tried this Lee's function?&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.lee-mac.com/texttowords.html" target="_blank" rel="noopener"&gt;http://www.lee-mac.com/texttowords.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It works only on TEXTs... but try the workflow if you get satisfying results. If so, we could wrap it into a single command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EXPLODE the MTEXT, apply the routine, and convert it back to MTEXT using TXT2MTXT (mind the setting).&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 09:25:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12512593#M18865</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2024-01-22T09:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12513351#M18866</link>
      <description>&lt;P&gt;Well, I really would like to try that, but Lee Mac's website is down. Do you have the code on another site or send it locally?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisWebster_1-1705938201708.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1316950iCA22DE8300B38C13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisWebster_1-1705938201708.png" alt="ChrisWebster_1-1705938201708.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 15:43:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12513351#M18866</guid>
      <dc:creator>ChrisWebster</dc:creator>
      <dc:date>2024-01-22T15:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12513374#M18867</link>
      <description>&lt;P&gt;Ohh, that's unfortunate. Anyways, here you go.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 15:51:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12513374#M18867</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2024-01-22T15:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split MTEXT into separate MTEXT by words.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12513408#M18868</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/783594"&gt;@ChrisWebster&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Well, I really would like to try that, but Lee Mac's website is down. Do you have the code on another site or send it locally?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisWebster_1-1705938201708.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1316950iCA22DE8300B38C13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisWebster_1-1705938201708.png" alt="ChrisWebster_1-1705938201708.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Seems to be working fine&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;A href="http://www.lee-mac.com/texttowords.html" target="_blank"&gt;http://www.lee-mac.com/texttowords.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pendean_0-1705939327935.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1316958i94B26656DC7207FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pendean_0-1705939327935.png" alt="pendean_0-1705939327935.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 16:02:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/split-mtext-into-separate-mtext-by-words/m-p/12513408#M18868</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2024-01-22T16:02:10Z</dc:date>
    </item>
  </channel>
</rss>

