Add mtext with two lines of text to the leader (above-below)

Discussion in 'AutoCAD' started by mgrigoriev, Jun 7, 2004.

  1. mgrigoriev

    mgrigoriev Guest

    Hi,
    I would like to add an mtext object with two lines of text to the leader. One line-above the leader line, one-below. Here's the code that I am using right now:

    Set mtextObj = ThisDrawing.ModelSpace.AddMText(p, width, textString)
    points(0) = p(0): points(1) = p(1): points(2) = p(2)
    points(3) = p(0) + 0.0001: points(4) = p(1) + 0.0001: points(5) = p(2)
    points(6) = p(0) + 0.0001: points(7) = p(1) + 0.0002: points(8) = p(2)
    Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, mtextObj, LeaderType)
    leaderObj.Linetype = "Continuous"
    leaderObj.TextGap = 0
    leaderObj.Update

    Thanks,
    Mike
     
    mgrigoriev, Jun 7, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.