MainDictionary プロパティ(ActiveX)

スペルチェックで使用する現在のディクショナリを指定します。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.MainDictionary
object

タイプ: PreferencesFiles

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: 文字列

使用するスペルチェック ディクショナリ。

注意

追加の注意はありません。

VBA:

Sub Example_MainDictionary()
    ' This example returns the current setting of
    ' MainDictionary. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currMainDictionary As String
    Dim newMainDictionary As String
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current MainDictionary value
    currMainDictionary = preferences.Files.MainDictionary
    MsgBox "The current value for MainDictionary is " & currMainDictionary, vbInformation, "MainDictionary Example"
    
    ' Change the value for MainDictionary
    newMainDictionary = "TestMainDictionary"
    preferences.Files.MainDictionary = newMainDictionary
    MsgBox "The new value for MainDictionary is " & newMainDictionary, vbInformation, "MainDictionary Example"
    
    ' Reset MainDictionary to its original value
    preferences.Files.MainDictionary = currMainDictionary
    MsgBox "The MainDictionary value is reset to " & currMainDictionary, vbInformation, "MainDictionary Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_MainDictionary()
    ;; This example returns the current setting of
    ;; MainDictionary. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))

    ;; Retrieve the current MainDictionary value
    (setq currMainDictionary (vla-get-MainDictionary (vla-get-Files preferences)))
    (alert (strcat "The current value for MainDictionary is " currMainDictionary))
    
    ;; Change the value for MainDictionary
    (setq newMainDictionary "TestMainDictionary")
    (vla-put-MainDictionary (vla-get-Files preferences) newMainDictionary)
    (alert (strcat "The new value for MainDictionary is " newMainDictionary))
    
    ;; Reset MainDictionary to its original value
    (vla-put-MainDictionary (vla-get-Files preferences) currMainDictionary)
    (alert (strcat "The MainDictionary value is reset to " currMainDictionary))
)