TextString property example

Private Sub TextString_Example()

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

     ' AddText method. It then returns the TextString in a message box.

     Dim icadDoc As IntelliCAD.Document

     Dim myText As String

     Dim textObj As IntelliCAD.Text

     Dim insPt As IntelliCAD.Point

     Dim height As Double

     Dim NewScaleFac As Double

     Set icadDoc = ActiveDocument

     Set insPt = Library.CreatePoint(0, 9)

     height = 5

     myText = InputBox("Type some text here:")

     ' Add the Text object

     Set textObj = icadDoc.ModelSpace.AddText(myText, insPt, height)

     textObj.Update

     ThisDocument.ActiveViewport.ZoomExtents

     MsgBox "The text you type is: " & textObj.TextString

End Sub

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.