<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>CAD Forum discussion (EN) : mtext background mask auto-fit</title>
  <link>https://www.cadforum.cz/forum_en/</link>
  <description><![CDATA[This is an XML content feed of; CAD Forum discussion (EN) : CAD - general : mtext background mask auto-fit]]></description>
  <pubDate>Mon, 06 Apr 2026 23:43:28 +0000</pubDate>
  <lastBuildDate>Fri, 13 May 2011 05:01:57 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum_en/RSS_post_feed.asp?TID=5847</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD Forum discussion (EN)]]></title>
   <url>https://www.cadforum.cz/forum_en/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum_en/</link>
  </image>
  <item>
   <title><![CDATA[mtext background mask auto-fit : Oh yeah, here&amp;#039;s the MText...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5847&amp;PID=15265&amp;title=mtext-background-mask-autofit#15265</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=45586">alanjt</a><br /><strong>Subject:</strong> 5847<br /><strong>Posted:</strong> 13.May.2011 at 05:01<br /><br />Oh yeah, here's the MText LISP macro I use to place MText with a zero width. The really nice thing is, you can right-click/enter at the first getpoint prompt and you'll be able to place MText with a defined width.<br><br><table width="99%"><tr><td><pre class="BBcode">; mtext with 0 width<br>(defun c:T (/ pt)<br>&nbsp; (initdia)<br>&nbsp; (command "_.mtext")<br>&nbsp; (if (setq pt (getpoint "\nSpecify insertion point &lt;First corner&gt;: "))<br>&nbsp;&nbsp;&nbsp; (command "_non" pt "_W" 0.)<br>&nbsp; )<br>&nbsp; (princ)<br>)</pre></td></tr></table><br>]]>
   </description>
   <pubDate>Fri, 13 May 2011 05:01:57 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5847&amp;PID=15265&amp;title=mtext-background-mask-autofit#15265</guid>
  </item> 
  <item>
   <title><![CDATA[mtext background mask auto-fit :  The background mask limits (plus...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5847&amp;PID=15264&amp;title=mtext-background-mask-autofit#15264</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=45586">alanjt</a><br /><strong>Subject:</strong> 5847<br /><strong>Posted:</strong> 13.May.2011 at 04:59<br /><br />The background mask limits (plus the defined offset) are defined by the width of the MText object. Just set the MText to have a width of zero. Here's a LISP I wrote a while back for doing that very thing. Unless I'm typing notes in paperspace, I create all MText with a zero width (even have a LISP macro to avoid having to specify a zero width each time).<br><br><table width="99%"><tr><td><pre class="BBcode">(defun c:WD (/ ss wd)<br>&nbsp; ;; Change width of selected MText and MultiLeader objects<br>&nbsp; ;; Alan J. Thompson, 11.05.09<br>&nbsp; (vl-load-com)<br>&nbsp; (if (and (setq ss (ssget "_:L" '((0 . "MTEXT,MULTILEADER"))))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq wd (initget 4)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wd (cond ((getdist "\nWidth &lt;0.0&gt;: "))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (vl-catch-all-apply<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (function vlax-put-property)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (list x<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cond ((eq (vla-get-objectname x) "AcDbMText") 'Width)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((eq (vla-get-objectname x) "AcDbMLeader") 'TextWidth)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wd<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (vla-delete ss)<br>&nbsp;&nbsp;&nbsp; )<br>&nbsp; )<br>&nbsp; (princ)<br>)</pre></td></tr></table><br> <span style="font-size:10px"><br /><br />Edited by alanjt - 13.May.2011 at 04:59</span>]]>
   </description>
   <pubDate>Fri, 13 May 2011 04:59:03 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5847&amp;PID=15264&amp;title=mtext-background-mask-autofit#15264</guid>
  </item> 
  <item>
   <title><![CDATA[mtext background mask auto-fit : anyone knowof a lisp which lets...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5847&amp;PID=15153&amp;title=mtext-background-mask-autofit#15153</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=183771">germanbarry</a><br /><strong>Subject:</strong> 5847<br /><strong>Posted:</strong> 09.May.2011 at 14:16<br /><br />anyone know&nbsp;of a lisp which lets you select one or many MTEXT entities and have the background mask "hug" the text nice and snugly on say one line of text as default?<DIV>&nbsp;</DIV><DIV>in an attempt to clarify: you can insert some MTEXT and it might only be 3 letters long but if the mtext box you traced before typing in the text was huge, and the MTEXT has a background mask/BGM, and is also at the front of your draw order, then that text BGM will be acting like a wipeout for the unused portion of its extents. </DIV><DIV>&nbsp;</DIV><DIV>I am hoping to find a lisp which will <strong>auto-size</strong> the mtext to hug the text nicely (similarly to what microsoft excel does to columns when you double-click on the edge of a column heading/name)</DIV><DIV>&nbsp;</DIV><DIV>obviously this lisp wouldnt apply if you have lots of MTEXTs going over multiple rows/lines within the single MTEXT entity and you want it to stay that way - this lisp would be most ideal for single-line MTEXT scenarios</DIV>]]>
   </description>
   <pubDate>Mon, 09 May 2011 14:16:40 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5847&amp;PID=15153&amp;title=mtext-background-mask-autofit#15153</guid>
  </item> 
 </channel>
</rss>