Description
Sets or returns the name of the text style for the MText entity.
Property type
Read-write property
Syntax
Visual Basic |
---|
Public Property StyleName As String |
Example
Private Sub StyleName_Example()
' This example creates text and adds it to the drawing using the
' AddText method. It then obtains the StyleName property.
Dim icadDoc As IntelliCAD.Document
Dim myText As String
Dim textObj As IntelliCAD.Text
Dim insPt As IntelliCAD.Point
Dim height As Double
Set icadDoc = ActiveDocument
Set insPt = Library.CreatePoint(0, 9)
height = 5
myText = "Test string for the StyleName property"
' Add the Text object
Set textObj = icadDoc.ModelSpace.AddText(myText, insPt, height)
textObj.Update
ThisDocument.Application.ZoomExtents
MsgBox "StyleName: " & textObj.StyleName
End Sub