CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

SCMCommandMode 属性 (ActiveX)

2023-1-3 06:58| 发布者: admin| 查看: 228| 评论: 0|来自: AutoCAD

摘要: 确定在命令模式下绘图区域中的右键单击功能,这意味着命令当前正在进行中。

确定在命令模式下绘图区域中的右键单击功能,这意味着命令当前正在进行中。

支持的平台:仅窗口

签名

工 务 局:

object.SCMCommandMode
对象

类型:首选项用户

此属性适用的对象。

属性值

只读:

类型:枚举AcDrawingAreaSCMCommand

  • acEnter:禁用命令快捷菜单。因此,在执行命令时在绘图区域中单击鼠标右键会发出 Enter 问题。
  • acEnableSCM:启用命令快捷菜单。
  • acEnableSCMOptions:仅当命令行提示符下当前有可用选项时,才启用命令快捷菜单。在命令行提示符下,选项括在方括号中。如果没有可用的选项,则右键单击 Enter。

言论

此属性的初始值为。acEnableSCMOptions

仅当属性设置为时,才能设置此属性。ShortcutMenuDisplayTrue

注意:此属性的值存储在快捷方式菜单系统变量中。

例子

工 务 局:

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

Visual 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)))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-11 16:04

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部