Support

As evidenced by over 30 years of development history, trust-worthy Korean CAD, CADian!

FAQ · 2013.12.11
CADian VBA Sample Code - 8 [ MText ]
AddMtext methodCreates an Mtext (multi-line text) object and adds it to the drawing.

Syntax

objectVariable = object.AddMtext(InsertionPoint, Width, Text)

Where:

objectVariable is an Mtext object;

object is one of the ModelSpace or PaperSpace collection objects or a Block object;

InsertionPoint is a Point object representing the location to insert the text;

Width is a double-precision variable or number representing the width of the bounding box;

Text is a String representing the text to appear in the window.


Examples...

AddMtext method example

----------------------------------------------------------

""objectVariable = Object.AddMText(InsertionPoint, width, Text)

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

Added to cart.

VIEW CART

Please sign in first.

JOIN