Private Sub AddMtextExample()
' This example creates Mtext and adds it to the drawing using the
' AddMtext method.
Dim icadDoc As IntelliCAD.Document
Dim myText As String
Dim mtextObj As IntelliCAD.MText
Dim corner As IntelliCAD.Point
Dim width As Double
Set icadDoc = ActiveDocument
Set corner = Library.CreatePoint(0, 9)
width = 10
myText = "Test string for the AddMtext method"
' Add the mtext Object
Set mtextObj = icadDoc.ModelSpace.AddMText(corner, width, myText)
mtextObj.Update
ThisDocument.ActiveViewport.ZoomExtents
End Sub