指定用于拼写检查的当前词典。 支持的平台:仅窗口 属性值只读:不 类型:字符串 要使用的拼写检查词典。 言论没有额外的评论。 例子工 务 局: 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))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 11:29
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.