CustomDictionary Пример

Sub Example_CustomDictionary()
    ' Этот пример возвращает текущую установку CustomDictionary. Затем
    ' изменяет значение, и наконец сбрасывает значение назад к
    ' первоначальной установке.
    
    Dim preferences As AcadPreferences
    Dim currCustomDictionary As String
    Dim newCustomDictionary As String
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Отыщите текущее значение CustomDictionary
    currCustomDictionary = preferences.Files.CustomDictionary
    MsgBox "Текущее значение для CustomDictionary " & currCustomDictionary, vbInformation, "CustomDictionary Пример"
    
    ' Измените значение для CustomDictionary
    newCustomDictionary = "TestCustomDictionary.cus"
    preferences.Files.CustomDictionary = newCustomDictionary
    MsgBox "Новое значение для CustomDictionary " & newCustomDictionary, vbInformation, "CustomDictionary Пример"
    
    ' Сбросьте CustomDictionary к его первоначальному значению
    preferences.Files.CustomDictionary = currCustomDictionary
    MsgBox "Значение CustomDictionary сброшено к " & currCustomDictionary, vbInformation, "CustomDictionary Пример"
End Sub
Сайт управляется системой uCoz