|
FontFile Пример |
Sub Example_FontFile()
' Этот пример возвращает текущую установку свойства FontFile. Затем
' изменяет значение и наконец сбрасывает значение назад к
' первоначальной установке.
Dim textStyle1 As AcadTextStyle
Dim currFontFile As String
Dim newFontFile As String
Set textStyle1 = ThisDrawing.ActiveTextStyle
' Отыщите текущее значение FontFile
currFontFile = textStyle1.fontFile
MsgBox "Текущее значение для FontFile " & currFontFile, vbInformation, "FontFile Пример"
' Измените значение для FontFile
newFontFile = "C:/AutoCAD/Fonts/italic.shx"
textStyle1.fontFile = newFontFile
MsgBox "Новое значение для FontFile " & textStyle1.fontFile, vbInformation, "FontFile Пример"
' Сбросьте файл шрифта
textStyle1.fontFile = currFontFile
MsgBox "Значение для FontFile было сброшено к " & textStyle1.fontFile, vbInformation, "FontFile Пример"
End Sub