.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mText

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
quigs
711 Views, 2 Replies

mText

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.
My name is Martin.. 😄
2 REPLIES 2
Message 2 of 3
quigs
in reply to: quigs

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)

My name is Martin.. 😄
Message 3 of 3
Hallex
in reply to: quigs

Martin,

Thanks for sharing the solution

Regards,

Oleg

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost