控制时间敏感的右键单击行为。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性用于设置时间敏感的右键单击行为。快速单击与按 Enter 相同。单击时间越长,将显示快捷菜单。仅当属性设置为时,才能设置此属性。ShortcutMenuDisplayTrue 您可以使用属性设置右键单击的持续时间。SCMTimeValue 注意:此属性的值存储在 SHORTCUTMENUDURATION 系统变量中。
例子工 务 局: Sub Example_SCMTimeMode() ' This example reads and modifies the SCMTimeMode property. ' Then the property is reset to its original value. Dim ACADPref As AcadPreferencesUser Dim originalValue As Boolean, newValue As Boolean ' Get the UserPreferences object Set ACADPref = ThisDrawing.Application.Preferences.User originalValue = ACADPref.SCMTimeMode MsgBox "The SCMTimeMode property is currently: " & originalValue newValue = IIf(originalValue, False, True) ACADPref.SCMTimeMode = newValue MsgBox "The SCMTimeMode property has been set to: " & ACADPref.SCMTimeMode ' Reset the preference back to its original value ACADPref.SCMTimeMode = originalValue MsgBox "The SCMTimeMode property was reset back to: " & originalValue End Sub Visual LISP: (vl-load-com) (defun c:Example_SCMTimeMode() ;; This example reads and modifies the SCMTimeMode property. ;; Then the property is reset to its original value. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Read and display the original value (setq originalValue (vla-get-SCMTimeMode (vla-get-User preferences))) (alert (strcat "The SCMTimeMode property is currently: " (if (= originalValue :vlax-true) "True" "False"))) ;; Modify the SCMTimeMode preference by toggling the value (setq newValue (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (vla-put-SCMTimeMode (vla-get-User preferences) newValue) (alert (strcat "The SCMTimeMode property has been set to: " (if (= newValue :vlax-true) "True" "False"))) ;; Reset the preference back to its original value (vla-put-SCMTimeMode (vla-get-User preferences) originalValue) (alert (strcat "The SCMTimeMode property was reset back to: " (if (= originalValue :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:16
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.