SCMTimeValue プロパティ(ActiveX)

ショートカットメニューを表示するロング クリックの有効期間を設定して、操作時間に制限のある右クリックをコントロールします。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.SCMTimeValue
object

タイプ: PreferencesUser

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: 長整数型

100 から 10,000 までのミリ秒数。初期値は 250 です。

注意

このプロパティは、SCMTimeMode プロパティが True に設定されていると、右クリックの動作に影響します。

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