AddMText method example
Sub AddMtextExample()
Dim sBuf As String
Dim oMtext As AcadMText
Dim insPt(0 To 2) As Double
insPt(0) = 0: insPt(1) = 9
Dim dWidth As Double
dWidth = 50
sBuf = "Line one of test string for the AddMtext method"
sBuf = sBuf & vbCrLf & "Line two of test string for the AddMtext method"
sBuf = sBuf & vbCrLf & "Line three of test string for the AddMtext method"
Set oMtext = ThisDrawing.ModelSpace.AddMText(insPt, dWidth, sBuf)
oMtext.width = dWidth
oMtext.Height = 1
oMtext.Update
ThisDrawing.Application.ZoomExtents
End Sub
© Bricsys NV. All rights reserved. |