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