|
TextEditor Пример |
Sub Example_TextEditor()
'Этот пример возвращает текущую установку TextEditor. Затем изменяет значение
' и наконец сбрасывает значение назад к оригинальной установке.
Dim preferences As AcadPreferences
Dim currTextEditor As String
Dim newTextEditor As String
Set preferences = ThisDrawing.Application.preferences
'Получите текущее значение TextEditor
currTextEditor = preferences.Files.TextEditor
MsgBox "Текущее значение для TextEditor " & currTextEditor, vbInformation, "TextEditor Пример"
'Измените значение для TextEditor
newTextEditor = "TestTextEditor"
preferences.Files.TextEditor = newTextEditor
MsgBox "Новое значение для TextEditor " & newTextEditor, vbInformation, "TextEditor Пример"
'Сбросьте TextEditor к его оригинальному значению
preferences.Files.TextEditor = currTextEditor
MsgBox "Значение TextEditor сброшено к " & currTextEditor, vbInformation, "TextEditor Пример"
End Sub