SCMCommandMode 属性 (ActiveX)
确定在命令模式下在绘图区域中单击鼠标右键的功能,这意味着命令当前正在进行中。 支持的平台:仅限 Windows 属性值只读:不 类型:枚举AcDrawingAreaSCMCommand
言论此属性的初始值为 。acEnableSCMOptions 仅当该属性设置为 时,才能设置此属性。ShortcutMenuDisplayTrue 注意:此属性的值存储在 SHORTCUTMENU 系统变量中。
例子VBA: Sub Example_SCMCommandMode() ' This example reads and modifies the SCMCommandMode ' preference value. ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadPreferencesUser Dim originalValue As Integer, newValue As Integer ' Get the user preferences object Set ACADPref = ThisDrawing.Application.Preferences.User ' Read and display the original value originalValue = ACADPref.SCMCommandMode MsgBox "The SCMCommandMode preference is set to: " & originalValue ' Modify the SCMCommandMode preference by toggling the value ACADPref.SCMCommandMode = acEnter MsgBox "The SCMCommandMode preference has been set to: " & ACADPref.SCMCommandMode ' Reset the preference back to its original value ACADPref.SCMCommandMode = originalValue MsgBox "The SCMCommandMode preference was reset back to: " & originalValue End Sub 可视化 LISP: (vl-load-com) (defun c:Example_SCMCommandMode() ;; This example reads and modifies the SCMCommandMode ;; preference value. ;; When finished, this example resets the preference value back 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-SCMCommandMode (vla-get-User preferences))) (alert (strcat "The SCMCommandMode preference is set to: " (itoa originalValue))) ;; Modify the SCMCommandMode preference by toggling the value (vla-put-SCMCommandMode (vla-get-User preferences) acEnter) (alert (strcat "The SCMCommandMode preference has been set to: " (itoa (vla-get-SCMCommandMode (vla-get-User preferences))))) ;; Reset the preference back to its original value (vla-put-SCMCommandMode (vla-get-User preferences) originalValue) (alert (strcat "The SCMCommandMode preference was reset back to: " (itoa originalValue))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-19 06:51
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.