SCMEditMode 属性 (ActiveX)
在“编辑”模式下确定绘图区域中的右键单击功能,这意味着选择了一个或多个对象,并且没有正在进行的命令。 支持的平台:仅限 Windows 属性值只读:不 类型:枚举AcDrawingAreaSCMEdit
言论此属性的初始值为 。acEdSCM 仅当属性设置为 True 时,才能设置此属性。ShortcutMenuDisplay
注意:此属性的值存储在 SHORTCUTMENU 系统变量中。
例子VBA: Sub Example_SCMEditMode()
' This example reads and modifies the SCMEditMode
' 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.SCMEditMode
MsgBox "The SCMEditMode preference is set to: " & originalValue
' Modify the SCMEditMode preference by toggling the value
ACADPref.SCMEditMode = acEdRepeatLastCommand
MsgBox "The SCMEditMode preference has been set to: " & ACADPref.SCMEditMode
' Reset the preference back to its original value
ACADPref.SCMEditMode = originalValue
MsgBox "The SCMEditMode preference was reset back to: " & originalValue
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_SCMEditMode()
;; This example reads and modifies the SCMEditMode
;; 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-SCMEditMode (vla-get-User preferences)))
(alert (strcat "The SCMEditMode preference is set to: " (itoa originalValue)))
;; Modify the SCMEditMode preference by toggling the value
(vla-put-SCMEditMode (vla-get-User preferences) acEdRepeatLastCommand)
(alert (strcat "The SCMEditMode preference has been set to: " (itoa (vla-get-SCMEditMode (vla-get-User preferences)))))
;; Reset the preference back to its original value
(vla-put-SCMEditMode (vla-get-User preferences) originalValue)
(alert (strcat "The SCMEditMode preference was reset back to: " (itoa originalValue)))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-30 23:22
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.