mText

mText

Anonymous
Not applicable
999 Views
2 Replies
Message 1 of 3

mText

Anonymous
Not applicable
Hi there,
I am adding some mtext to a jigs worlddraw. Using:

Dim Tx As New MText
Tx.Location = “a 3d point”
Tx.Contents = “a var that I have created”
draw.geometry.draw(tx)

The mtext displays fine, but I have tried in vain to change the font, to another but I am having no luck. Can anyone suggest a way that I may do that. Any font would do, so I can test it works.

Thanks,

Martin.
0 Likes
Accepted solutions (1)
1,000 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Hi,

I have found the solution:

 

      ' Get Font
            Dim acTextStyleTblRec As TextStyleTableRecord
            acTextStyleTblRec = acTrans.GetObject(acCurDb.Textstyle, OpenMode.ForWrite)
            acTextStyleTblRec.FileName = "Arial"
            acTrans.Commit()
            ' Mtext
            Dim IP As Point3d = InsPt
            Dim MText As New MText
            MText.Attachment = AttachmentPoint.BottomCenter
            MText.Contents = "21"
            MText.TextHeight = 6.4
            MText.Location = InsPt
            MText.ColorIndex = 7
            MText.TextStyle = acCurDb.Textstyle
            draw.Geometry.Draw(MText)

Message 3 of 3

Hallex
Advisor
Advisor

Martin,

Thanks for sharing the solution

Regards,

Oleg

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes