<?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 annotative mleader problem in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793717#M45581</link>
    <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem about mtext textheight inside annotative mleader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my software create a mleader object in the model space , this mleader use a mtext object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the mtext use the default textstyle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if , then creating the leader, the annotative scale of the model space is not 1:1 ,&lt;/P&gt;&lt;P&gt;the mtext textheight is autatcly divided by the annotative scale&lt;/P&gt;&lt;P&gt;(for example : original textheight=2.5, annotative scale=20 , after insertion the textheight is 0.125, exactly 2.5/20)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create my mleader the the desired textheight ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;joined , you can find a sample of my project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2014 17:50:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-04T17:50:24Z</dc:date>
    <item>
      <title>annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793717#M45581</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem about mtext textheight inside annotative mleader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my software create a mleader object in the model space , this mleader use a mtext object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the mtext use the default textstyle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if , then creating the leader, the annotative scale of the model space is not 1:1 ,&lt;/P&gt;&lt;P&gt;the mtext textheight is autatcly divided by the annotative scale&lt;/P&gt;&lt;P&gt;(for example : original textheight=2.5, annotative scale=20 , after insertion the textheight is 0.125, exactly 2.5/20)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create my mleader the the desired textheight ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;joined , you can find a sample of my project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 17:50:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793717#M45581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-04T17:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793881#M45582</link>
      <description>&lt;P&gt;I just went through adding mleaders myself and i think i can offer some suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of "mText.Height = 30" try "mText.&lt;STRONG&gt;TextHeight&lt;/STRONG&gt; = 30". I fell for that same trick and i think this will fix your problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;I had to attach the mtext to the mleader AFTER the mleader had been added to the modelspace, but this may have nothing to do with your issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 18:51:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793881#M45582</guid>
      <dc:creator>jshimkus</dc:creator>
      <dc:date>2014-02-04T18:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793977#M45583</link>
      <description>&lt;P&gt;HI There,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea of using annotative text is for viewports. Now if your text height in Model Space is for example 3mm, and you have 4 viewports with different scales, your text height in paper space will remain 3mm even if you have different scales.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 19:37:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4793977#M45583</guid>
      <dc:creator>JoAnn_Hogan</dc:creator>
      <dc:date>2014-02-04T19:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4795093#M45584</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this don't solve the problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result is the same then adding then mtext.textheight=2.5 line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;an other idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;luc&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2014 07:46:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4795093#M45584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-05T07:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4795535#M45585</link>
      <description>&lt;P&gt;Is the code you attached working?&lt;/P&gt;&lt;P&gt;I ask because I see that you did not AppendEntity&amp;nbsp;or AddNewlyCreatedDBObject your mtext object.&lt;/P&gt;&lt;P&gt;I tried that in my code and it would not run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached what I did, hopefully it will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2014 12:21:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4795535#M45585</guid>
      <dc:creator>jshimkus</dc:creator>
      <dc:date>2014-02-05T12:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4797687#M45586</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;my code is working (expect the text height problem)&lt;BR /&gt;&lt;BR /&gt;I'm working with the 2014 autocad version&lt;BR /&gt;&lt;BR /&gt;while testing your code , I have then same size problem&lt;BR /&gt;&lt;BR /&gt;Have you tested your solution in my sample case ?&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;Luc&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Feb 2014 07:57:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4797687#M45586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T07:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4797947#M45587</link>
      <description>&lt;P&gt;The only other thing I can think of is your "Annotation Plot Size" setting, is that correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that, I'm out of ideas.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2014 11:35:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4797947#M45587</guid>
      <dc:creator>jshimkus</dc:creator>
      <dc:date>2014-02-06T11:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4808021#M45588</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to verify Annotation Plot Size in vanilla autocad&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;luc&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2014 12:49:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4808021#M45588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-11T12:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4808431#M45590</link>
      <description>&lt;P&gt;On command line type “units”&lt;/P&gt;&lt;P&gt;A dialog box should open, go to the “Scale” tab and “Annotation Plot Size:” is at the top right.&lt;/P&gt;&lt;P&gt;Ours is set to 3/32”&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2014 15:45:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4808431#M45590</guid>
      <dc:creator>jshimkus</dc:creator>
      <dc:date>2014-02-11T15:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4808483#M45591</link>
      <description>&lt;P&gt;The mleader just uses the contents of the mtext or just just copies the&amp;nbsp;contents.&lt;/P&gt;&lt;P&gt;To set the hieght use MLeader.TextHeight Property&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normally set it from its MleaderStyle.TextHeight&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#ff0000"&gt;Leader.TextHeight = 30&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;instead of&lt;/P&gt;&lt;P&gt;mText.Height or TextHeight&lt;/P&gt;&lt;PRE&gt;        &amp;lt;CommandMethod("TST_L", CommandFlags.Modal)&amp;gt; _
        Public Sub TST_L()
            Dim Doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
            Dim ed As Editor = Doc.Editor
            Dim db As Database = ed.Document.Database
            Dim Dl As Autodesk.AutoCAD.ApplicationServices.DocumentLock = Doc.LockDocument(Autodesk.AutoCAD.ApplicationServices.DocumentLockMode.ProtectedAutoWrite, "", "", False)
            Using Dl
                Dim tr As Transaction = db.TransactionManager.StartTransaction()
                Dim btr As BlockTableRecord = DirectCast(tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite), BlockTableRecord)

                Dim PtFleche As New Point3d(0, 0, 0)
                Dim PtFleche2 As New Point3d(PtFleche.X + 4, PtFleche.Y + 4, PtFleche.Z)
                Dim PtTexte As New Point3d(PtFleche.X + 8, PtFleche.Y + 6, PtFleche.Z)


              

                Dim Leader As New MLeader
                Leader.SetDatabaseDefaults()
                Leader.ContentType = ContentType.MTextContent
                'Leader.LayerId = CalqId


                Leader.ArrowSize = 2.0
                Leader.EnableDogleg = False
                Dim idx As Integer = Leader.AddLeaderLine(PtFleche2)
                Leader.AddFirstVertex(idx, PtFleche)
                Leader.Annotative = AnnotativeStates.True

                btr.AppendEntity(Leader)
                tr.AddNewlyCreatedDBObject(Leader, True)


                Using mText As New MText()
                    mText.Contents = "MyTexte"
                    Leader.MText = mText
                End Using
                Leader.TextHeight = 30
                'Dim mlstyle As MLeaderStyle = Leader.MLeaderStyle.GetObject(OpenMode.ForRead)
                'Leader.TextHeight = mlstyle.TextHeight
            

                tr.Commit()
            End Using

            MsgBox("now change the annotation scale to 20 (for exemple)" &amp;amp; vbCrLf &amp;amp; _
                    "then restart the tst_l command" &amp;amp; vbCrLf &amp;amp; vbCrLf &amp;amp; _
                    "then look at the text height of the new leader" &amp;amp; vbCrLf &amp;amp; _
                    "it is le 20th of the previous one")
        End Sub&lt;/PRE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:13:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4808483#M45591</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2014-02-11T16:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: annotative mleader problem</title>
      <link>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4811339#M45592</link>
      <description>&lt;P&gt;Thanks Jeff,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;luc&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2014 16:45:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/annotative-mleader-problem/m-p/4811339#M45592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-12T16:45:22Z</dc:date>
    </item>
  </channel>
</rss>

