座標データの入力に対する AutoCAD の応答方法をコントロールします。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: acKeyboardPriority 列挙型
このプロパティの初期値は acKeyboardEntryExceptScripts です。
VBA:
Sub Example_KeyboardPriority() ' This example returns the current setting of ' KeyboardPriority. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currKeyboardPriority As Integer Dim constant As String Dim newConstant As String Set preferences = ThisDrawing.Application.preferences ' Retrieve the current KeyboardPriority value currKeyboardPriority = preferences.User.KeyboardPriority constant = Choose(currKeyboardPriority + 1, "acKeyboardRunningObjSnap", "acKeyboardEntry", "acKeyboardEntryExceptScripts") MsgBox "The current value for KeyboardPriority is " & constant, vbInformation, "KeyboardPriority Example" ' Change the value for KeyboardPriority newConstant = "acKeyboardEntry" preferences.User.KeyboardPriority = acKeyboardEntry MsgBox "The new value for KeyboardPriority is " & newConstant, vbInformation, "KeyboardPriority Example" ' Reset KeyboardPriority to its original value preferences.User.KeyboardPriority = currKeyboardPriority MsgBox "The KeyboardPriority value is reset to " & constant, vbInformation, "KeyboardPriority Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_KeyboardPriority() ;; This example returns the current setting of ;; KeyboardPriority. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current KeyboardPriority value (setq currKeyboardPriority (vla-get-KeyboardPriority (vla-get-User preferences))) (setq constant (cond ((= currKeyboardPriority 0) "acKeyboardRunningObjSnap") ((= currKeyboardPriority 1) "acKeyboardEntry") ((= currKeyboardPriority 2) "acKeyboardEntryExceptScripts"))) (alert (strcat "The current value for KeyboardPriority is " constant)) ;; Change the value for KeyboardPriority (setq newConstant "acKeyboardEntry") (vla-put-KeyboardPriority (vla-get-User preferences) acKeyboardEntry) (alert (strcat "The new value for KeyboardPriority is " newConstant)) ;; Reset KeyboardPriority to its original value (vla-put-KeyboardPriority (vla-get-User preferences) currKeyboardPriority) (alert (strcat "The KeyboardPriority value is reset to " constant)) )