作図領域での右クリックに対してショートカット メニューを表示するか、[Enter]を発行するかをコントロールします。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: ブール型
このプロパティの初期値は True です。
このプロパティが True に設定されている場合、PreferencesUser オブジェクト内のプロパティを使用して作図領域の右クリックの機能をカスタマイズできます。
VBA:
Sub Example_ShortCutMenuDisplay() ' This example reads and toggles the preference value which controls ' whether right-clicking in the drawing area displays a shortcut menu ' or issues ENTER. Dim ACADPref As AcadPreferencesUser Dim originalValue As Variant, newValue As Variant Dim newAction As String ' Get the drafting preferences object Set ACADPref = ThisDrawing.Application.Preferences.User ' Read and display the original value originalValue = ACADPref.ShortCutMenuDisplay newAction = IIf(originalValue, "displays the shortcut menu", "sends an ENTER keystroke to ACAD") MsgBox "Right-clicking the mouse CURRENTLY " & newAction, vbInformation ' Modify the AutoSnapMarker preference by toggling the value ACADPref.ShortCutMenuDisplay = Not (originalValue) newValue = ACADPref.ShortCutMenuDisplay newAction = IIf(newValue, "display the shortcut menu", "send an ENTER keystroke to ACAD") MsgBox "Right-clicking the mouse over the drawing WILL NOW " & newAction, vbInformation End Sub
Visual LISP:
(vl-load-com) (defun c:Example_ShortCutMenuDisplay() ;; This example reads and toggles the preference value which controls ;; whether right-clicking in the drawing area displays a shortcut menu ;; or issues ENTER. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Read and display the original value (setq originalValue (vla-get-ShortCutMenuDisplay (vla-get-User preferences))) (setq newAction (if (= originalValue :vlax-true) "displays the shortcut menu" "sends an ENTER keystroke to ACAD")) (alert (strcat "Right-clicking the mouse CURRENTLY " newAction)) ;; Modify the AutoSnapMarker preference by toggling the value (vla-put-ShortCutMenuDisplay (vla-get-User preferences) (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (setq newValue (vla-get-ShortCutMenuDisplay (vla-get-User preferences))) (setq newAction (if (= newValue :vlax-true) "displays the shortcut menu" "sends an ENTER keystroke to ACAD")) (alert (strcat "Right-clicking the mouse over the drawing WILL NOW " newAction)) )