Specifies the current dictionary to use for spell checking.
Supported platforms: Windows only
VBA:
object.MainDictionary
Type: PreferencesFiles
The object this property applies to.
Read-only: No
Type: String
The spell-checking dictionary to use.
No additional remarks.
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))
)