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