IntelliCAD 11.1 Object Library | |
AddMText Method | |
See Also |
- InsertionPoint
- A Point object representing the location to insert the text.
- Width
- The width of the bounding box.
- Text
- The text to appear in the window.
Block Collection : AddMText Method |
Description
Adds a multiline text entity in a rectangle defined by the insertion point and width of the text window.
Syntax
Visual Basic |
---|
Public Function AddMText( _ ByVal InsertionPoint As Point, _ ByVal Width As Double, _ ByVal Text As String _ ) As MText |
Parameters
- InsertionPoint
- A Point object representing the location to insert the text.
- Width
- The width of the bounding box.
- Text
- The text to appear in the window.
Example
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.Application.ZoomExtents
End Sub