<?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 How to modify the defined height of MText through COM API in C#? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10478782#M3233</link>
    <description>&lt;P&gt;I use command:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AcadApplication AppAutoCAD = new AcadApplication();
AcadDocument AcDocument = AppAutoCAD.ActiveDocument;
AcadModelSpace AcModelSpace = AcDocument.ModelSpace;
AcadMText AcMText = AcModelSpace.AddMText(new double[] { 0, 0, 0 }, 0, "你好");
AcMText.Width = 50;
AcMText.Height = 30;&lt;/LI-CODE&gt;&lt;P&gt;The result is the width of MText changed. Also the height of MText changed, but it changed the text height, not defined height. So, how to change the defined height?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 09:06:20 GMT</pubDate>
    <dc:creator>1605027848</dc:creator>
    <dc:date>2021-07-19T09:06:20Z</dc:date>
    <item>
      <title>How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10478782#M3233</link>
      <description>&lt;P&gt;I use command:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AcadApplication AppAutoCAD = new AcadApplication();
AcadDocument AcDocument = AppAutoCAD.ActiveDocument;
AcadModelSpace AcModelSpace = AcDocument.ModelSpace;
AcadMText AcMText = AcModelSpace.AddMText(new double[] { 0, 0, 0 }, 0, "你好");
AcMText.Width = 50;
AcMText.Height = 30;&lt;/LI-CODE&gt;&lt;P&gt;The result is the width of MText changed. Also the height of MText changed, but it changed the text height, not defined height. So, how to change the defined height?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 09:06:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10478782#M3233</guid>
      <dc:creator>1605027848</dc:creator>
      <dc:date>2021-07-19T09:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10479536#M3234</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I gues &lt;A href="https://forums.autodesk.com/t5/net/bd-p/152" target="_self"&gt;THIS FORUM&lt;/A&gt; is more appropriate to this problem in C#.NET&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope can help u &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:22:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10479536#M3234</guid>
      <dc:creator>seabrahenrique</dc:creator>
      <dc:date>2021-07-19T14:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10479567#M3235</link>
      <description>&lt;P&gt;OK, Thank you, I will wait for a while. If it really doesn't work, I will upload to another forum you suggest.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:28:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10479567#M3235</guid>
      <dc:creator>1605027848</dc:creator>
      <dc:date>2021-07-19T14:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10479614#M3236</link>
      <description>&lt;P&gt;The COM api doesn't expose those properties. You will need to use the .NET api. However, you can set the Width of the bounding box in the AddMtext method. In the example in your first post, it's the second argument. You set it at 0. Just change the argument to 50. Or you can prompt the user for a value.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:44:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10479614#M3236</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2021-07-19T14:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10489650#M3237</link>
      <description>&lt;P&gt;Thank you, I know AddMText method can pass an argument to change the width of bounding box. so, I guess it can change the width of bounding box, it also can the height of bounding box. That's why I asked if the define height can be changed though COM API, if it can, how to change it, if it can not, then forget it.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 04:17:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10489650#M3237</guid>
      <dc:creator>1605027848</dc:creator>
      <dc:date>2021-07-23T04:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10491100#M3238</link>
      <description>&lt;P&gt;I'm sorry, the VBA api doesn't have a Height property for the text box. But the .Net api has a TextHeight property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You shouldn't need to set the height. As you add text, it scrolls down to add new lines and the height automatically adjusts. It doesn't stop adding text because the height is too small.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 15:14:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10491100#M3238</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2021-07-23T15:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the defined height of MText through COM API in C#?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10492521#M3239</link>
      <description>&lt;P&gt;OK, I know.&amp;nbsp; Just like you said,&amp;nbsp;&lt;SPAN&gt;when I add text, it scrolls down to add new lines and the height automatically adjusts.&amp;nbsp;&lt;/SPAN&gt;Actually, there is an another reason why I want to change the define height of bounding box. Because the drawing is done through COM API, in order to better align the text, I want to modify the defined height of text. Since it can't be modified. Then I can only align it by his InsertPoint property.&amp;nbsp;Thank you very much for your answer!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 07:13:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-modify-the-defined-height-of-mtext-through-com-api-in-c/m-p/10492521#M3239</guid>
      <dc:creator>1605027848</dc:creator>
      <dc:date>2021-07-24T07:13:38Z</dc:date>
    </item>
  </channel>
</rss>

