PreferencesSystem オブジェクトを取得します。
サポートされているプラットフォーム: Windows のみ
PreferencesSystem オブジェクトは、レジストリに保存されている[オプション]ダイアログ ボックスの[システム]タブのすべてのオプションを保持しています。図面とともに保存されたすべてのオプションは、DatabasePreferences オブジェクトで検索できます。
VBA:
Sub Example_System()
' This example obtains a reference to the System Preferences object
' from the Application Preferences object, and reads one of the System
' preferences
Dim ACADPref As AcadPreferencesSystem
' Obtain a reference to the System Preferences object
Set ACADPref = ThisDrawing.Application.Preferences.System
MsgBox "You now have access to the properties and methods of the System Preferences object!"
MsgBox "The System preference BeepOnError is set to: " & ACADPref.BeepOnError
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_System()
;; This example obtains a reference to the System Preferences object
;; from the Application Preferences object, and reads one of the System
;; preferences
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
(alert "You now have access to the properties and methods of the System Preferences object!")
(alert (strcat "The System preference BeepOnError is set to: " (if (= (vla-get-BeepOnError (vla-get-System preferences)) :vlax-true) "True" "False")))
)