<?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 MText or DBText, which one to use? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266125#M36409</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to label closed polylines on the canvas with text labels using the .net api. I am presented with these two options. MText and DBText&amp;nbsp;What are differences between the two? Is there any particular advantages/disadvantages using one over the other?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already tried online searches for these but the search results where not very helpful. Any ideas would greatly be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rashid.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2016 15:26:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-04-12T15:26:19Z</dc:date>
    <item>
      <title>MText or DBText, which one to use?</title>
      <link>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266125#M36409</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to label closed polylines on the canvas with text labels using the .net api. I am presented with these two options. MText and DBText&amp;nbsp;What are differences between the two? Is there any particular advantages/disadvantages using one over the other?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already tried online searches for these but the search results where not very helpful. Any ideas would greatly be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rashid.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 15:26:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266125#M36409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T15:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: MText or DBText, which one to use?</title>
      <link>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266689#M36410</link>
      <description>&lt;P&gt;If by "DBText" [is that a .net API term?] you mean what a lot of people often refer to as "DTEXT," be aware that in AutoCAD there is no such entity type -- it's just TEXT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If any of your labels will need &lt;EM&gt;more than one line&lt;/EM&gt;, Mtext will do that in &lt;EM&gt;one&lt;/EM&gt; object [that's what the M is for], whereas with Text you would need a separate object for each line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For &lt;EM&gt;single&lt;/EM&gt;-line content, Text &lt;EM&gt;uses less memory&lt;/EM&gt; than Mtext.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you would ever need to include &lt;EM&gt;stacked fractions&lt;/EM&gt;, Text can't do that [unless you have a font with special characters defined for some of those], so you would need to use Mtext.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Text can be given a &lt;EM&gt;width factor&lt;/EM&gt; and/or an &lt;EM&gt;obliquing angle&lt;/EM&gt;, neither of which you can do with Mtext except for the &lt;EM&gt;limited&lt;/EM&gt; obliquing&amp;nbsp;of italics, but a) that can only be used with&amp;nbsp;.ttf fonts [not .shx fonts -- Text can oblique either], and b) you have no say in the&amp;nbsp;&lt;EM&gt;degree&lt;/EM&gt; of obliquing [with Text, you can&amp;nbsp;tilt it to any angle you want].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mtext can be made Bold or not within the use of the same [.ttf only]&amp;nbsp;font, whereas Text [of whichever font type] requires either a bolder font or [in .shx fonts] a different lineweight.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Mtext, you can change properties of &lt;EM&gt;portions&lt;/EM&gt; of the &lt;EM&gt;same&lt;/EM&gt; object separately from&amp;nbsp;the rest&amp;nbsp;[height, italics, bold, color, even the font], whereas all those characteristics [and also width factor] apply to the&lt;EM&gt; entirety&lt;/EM&gt; of a Text object.&amp;nbsp; So with Mtext, you can&amp;nbsp;[for instance] have a room label in a floor plan that has the room name larger and bolder, and its square footage smaller and lighter, and its occupant's name different from either of those [and italic, or whatever], and a room number, and so on, all in &lt;EM&gt;one&lt;/EM&gt; object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Text has &lt;EM&gt;both&lt;/EM&gt; Middle &lt;EM&gt;and&lt;/EM&gt; Middle Center justification options,&amp;nbsp;as well as Left &lt;EM&gt;and&lt;/EM&gt; Bottom Left,&amp;nbsp;Center &lt;EM&gt;and&lt;/EM&gt; Bottom Center, and&amp;nbsp;Right &lt;EM&gt;and&lt;/EM&gt; Bottom Right, which have&amp;nbsp;different effects depending on whether the content has characters that extend [for the Middle versions} above or below the nominal height, or [for the Bottom versions] below the baseline.&amp;nbsp; Mtext has only the two-word versions of all those, so [for instance] you can't have the insertion-point bottom&amp;nbsp;of an Mtext object &lt;EM&gt;on the baseline&lt;/EM&gt; of the bottom line of text if it has any descenders, and if you change its content, it can &lt;EM&gt;shift position&lt;/EM&gt; without its insertion point having been moved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Text also has the &lt;EM&gt;Align and Fit&lt;/EM&gt; options that have no corollary at all in Mtext.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mtext has a certain amount of word-processing-like capability [e.g. tabs].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are probably a few other things....&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 18:58:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266689#M36410</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-04-12T18:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: MText or DBText, which one to use?</title>
      <link>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266930#M36411</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; wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;Text can be given a &lt;EM&gt;width factor&lt;/EM&gt; and/or an &lt;EM&gt;obliquing angle&lt;/EM&gt;, neither of which you can do with Mtext ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I find that newer versions do have those available in Mtext [by selection &lt;EM&gt;within&lt;/EM&gt; the content, not applicable &lt;EM&gt;overall&lt;/EM&gt; to&amp;nbsp;Mtext objects as overrides but only if part of the definition of their text Style], so that's a version-dependent difference.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 20:38:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6266930#M36411</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-04-12T20:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: MText or DBText, which one to use?</title>
      <link>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6268228#M36412</link>
      <description>&lt;P&gt;Thanks a lot for your reply. It cleared up quite a few issues. I appreciate it very much.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:20:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6268228#M36412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-13T13:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: MText or DBText, which one to use?</title>
      <link>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6268408#M36413</link>
      <description>&lt;P&gt;Mr. Lisp? &amp;nbsp;Is that you? &amp;nbsp;I have read several of your posts over the years and I am taking this opportunity to say Thanks! &amp;nbsp;Are you working with OOP and Autodesk products? &amp;nbsp;If not, IMO you should try it - I am willing to bet you'll enjoy it and do quite well. There are plenty of samples and good answers in this forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;If by "DBText" [is that a .net API term?]&amp;lt;&amp;lt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;The .NET autodesk libraries are built with namespaces inside assemblies. &amp;nbsp;The assembly "Acdbmgd.dll" (aka &lt;U&gt;&lt;STRONG&gt;managed&lt;/STRONG&gt;&lt;/U&gt; autocad database reference) contains the "Autodesk.AutoCAD.DatabaseServices" namespace which contains autocad "Entity" class definitions. &amp;nbsp;There are 2 options for text - dbtext and mtext. &amp;nbsp;When you create an instance of the class (c# eg. &amp;nbsp;"MText mymtext = new MText();") you have access to all mtext methods and properties as defined in the library. &amp;nbsp;The screen shots are from the Object Browser in Visual Studio. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/231798iAB2F9431F48661BE/image-size/original?v=lz-1&amp;amp;px=-1" border="0" alt="acdbmgd_dbtext.PNG" title="acdbmgd_dbtext.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/231799iBFF5B96EC14D4059/image-size/original?v=lz-1&amp;amp;px=-1" border="0" alt="acdbmgd_mtext.PNG" title="acdbmgd_mtext.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 14:19:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/mtext-or-dbtext-which-one-to-use/m-p/6268408#M36413</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2016-04-13T14:19:51Z</dc:date>
    </item>
  </channel>
</rss>

