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