XRefFadeIntensity プロパティ(ActiveX)

外部参照の影表示の強度をコントロールします。

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

構文と要素

VBA:

object.XRefFadeIntensity
object

タイプ: PreferencesDisplay

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

プロパティの値

読み込み専用: いいえ

タイプ: 長整数型

外部参照のフェードのパーセンテージを表す 1~90 の正の長整数。

注意

このプロパティの初期値は 50 です。

注: このプロパティの値は、システム変数 XFADECTL に格納されます。

VBA:

Sub Example_XRefFadeIntensity()
    ' This example reads and modifies the preference value that controls
    ' the dimming intensity for xrefs. When finished, this example resets
    ' the preference value back to its original value.
    '
    ' * Note: Changes can only be observed when in-place editing of an Xref
    ' object is in progress and other entities are visible.
    
    Dim ACADPref As AcadPreferencesDisplay
    Dim originalValue As Variant, newValue As Variant
    
    ' Get the display preferences object
    Set ACADPref = ThisDrawing.Application.preferences.DISPLAY
    
    ' Read and display the original value
    originalValue = ACADPref.XRefFadeIntensity
    MsgBox "The XRefFadeIntensity preference is: " & originalValue

    ' Modify the XRefFadeIntensity preference by setting it to 75
    ACADPref.XRefFadeIntensity = 75
    newValue = ACADPref.XRefFadeIntensity
    ThisDrawing.Regen acAllViewports
    
    MsgBox "The XRefFadeIntensity preference has been set to: " & newValue

    ' Reset the preference back to its original value
    '
    ' * Note: Comment out this last section to leave the change to
    '         this preference in effect
    ACADPref.XRefFadeIntensity = originalValue
    ThisDrawing.Regen acAllViewports
    
    MsgBox "The XRefFadeIntensity preference was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_XRefFadeIntensity()
    ;; This example reads and modifies the preference value that controls
    ;; the dimming intensity for xrefs. When finished, this example resets
    ;; the preference value back to its original value.
    ;;
    ;; * Note: Changes can only be observed when in-place editing of an Xref
    ;; object is in progress and other entities are visible.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Read and display the original value
    (setq originalValue (vla-get-XRefFadeIntensity (vla-get-Display preferences)))
    (alert (strcat "The XRefFadeIntensity preference is: " (itoa originalValue)))

    ;; Modify the XRefFadeIntensity preference by setting it to 75
    (vla-put-XRefFadeIntensity (vla-get-Display preferences) 75)
    (vla-Regen doc acAllViewports)
    (alert (strcat "The XRefFadeIntensity preference has been set to: " (itoa (vla-get-XRefFadeIntensity (vla-get-Display preferences)))))

    ;; Reset the preference back to its original value
    ;;
    ;; * Note: Comment out this last section to leave the change to
    ;;         this preference in effect
    (vla-put-XRefFadeIntensity (vla-get-Display preferences) originalValue)
    (vla-Regen doc acAllViewports)
    (alert (strcat "The XRefFadeIntensity preference was reset back to: " (itoa (vla-get-XRefFadeIntensity (vla-get-Display preferences)))))
)