« CADopia - AddLightWeightPolyline method | Main | CADopia - AddPointEntity method »

Thursday, November 29, 2007

CADopia - AddMtext method

Creates 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.

AddMtext method example

Private Sub AddMtextExample()

     ' This example creates Mtext and adds it to the drawing using the

     ' AddMtext method.

     Dim icadDoc As CADopia.Document

     Dim myText As String

     Dim mtextObj As CADopia.MText

     Dim corner As CADopia.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

Comments

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment