Preferences オブジェクトを取得します。
サポートされているプラットフォーム: Windows のみ
Preferences オブジェクトは、レジストリに存在する[オプション]ダイアログ ボックスのオプションを保持します。図面に存在するオプションは、DatabasePreferences オブジェクトにあります。
VBA:
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))))
)