SCMCommandMode Property (ActiveX)

Determines right-click functionality in the drawing area while in Command mode, which means that a command is currently in progress.

Supported platforms: Windows only

Signature

VBA:

object.SCMCommandMode
object

Type: PreferencesUser

The object this property applies to.

Property Value

Read-only: No

Type: AcDrawingAreaSCMCommand enum

Remarks

The initial value for this property is acEnableSCMOptions.

This property can only be set when the ShortcutMenuDisplay property is set to True.

Note: The value of this property is stored in the SHORTCUTMENU system variable.

Examples

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

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