获取首选项对象。 支持的平台:仅窗口 言论该对象保存驻留在注册表中的“选项”对话框中的选项。可以通过对象找到驻留在图形中的选项。PreferencesDatabasePreferences 例子工 务 局: Sub Example_Preferences() ' This example returns the current setting of ' LogFilePath from the preferences object. Dim preferences As AcadPreferences Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current LogFilePath value MsgBox "The current value for LogFilePath is " & preferences.Files.LogFilePath, , "Preferences Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_Preferences() ;; This example returns the current setting of ;; LogFilePath from the preferences object. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current LogFilePath value (alert (strcat "The current value for LogFilePath is " (vla-get-LogFilePath (vla-get-Files preferences)))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:06
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.