SCMTimeValue Property (ActiveX)

Controls time-sensitive right-click behavior by setting the duration of the long click that displays a shortcut menu.

Supported platforms: Windows only

Signature

VBA:

object.SCMTimeValue
object

Type: PreferencesUser

The object this property applies to.

Property Value

Read-only: No

Type: Long

A number in milliseconds between 100 and 10,000. The initial value is 250.

Remarks

This property affects right-click behavior when the SCMTimeMode property is set to True.

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

Examples

VBA:

Sub Example_SCMTimeValue()
    ' This example reads and modifies the SCMTimeValue property.
    ' Then the property is reset to its original value.
    
    Dim ACADPref As AcadPreferencesUser
    Dim originalValue As Integer, newValue As Integer
    
    ' Get the UserPreferences object and set the SCMTimeMode property to True
    Set ACADPref = ThisDrawing.Application.Preferences.User
    ACADPref.SCMTimeMode = True
    
    originalValue = ACADPref.SCMTimeValue
    MsgBox "The SCMTimeValue property is currently: " & originalValue
    
    newValue = 1000
    ACADPref.SCMTimeValue = newValue
    
    MsgBox "The SCMTimeValue property has been set to: " & ACADPref.SCMTimeValue

    ' Reset the preference back to its original value
    ACADPref.SCMTimeValue = originalValue
    MsgBox "The SCMTimeValue property was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_SCMTimeValue()
    ;; This example reads and modifies the SCMTimeValue property.
    ;; Then the property is reset to its original value.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Get the UserPreferences object and set the SCMTimeMode property to True
    (vla-put-SCMTimeMode (vla-get-User preferences) :vlax-true)

    (setq originalValue (vla-get-SCMTimeValue (vla-get-User preferences)))
    (alert (strcat "The SCMTimeValue property is currently: " (itoa originalValue)))
    
    (setq newValue 1000)
    (vla-put-SCMTimeValue (vla-get-User preferences) newValue)
    
    (alert (strcat "The SCMTimeValue property has been set to: " (itoa (vla-get-SCMTimeValue (vla-get-User preferences)))))

    ;; Reset the preference back to its original value
    (vla-put-SCMTimeValue (vla-get-User preferences) originalValue)
    (alert (strcat "The SCMTimeValue property was reset back to: " (itoa originalValue)))
)