外部参照に従属する画層の表示/非表示を決定、およびネストされた外部参照のパスの変更を保存するかどうかを指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: ブール型
このプロパティの初期値は True です。
このプロパティが True に設定されている場合、画層の設定は現在の図面の画層テーブルと一緒に保存され、以後の各セッションで持続します。ネストした外部参照パスの変更は現在の図面と一緒に保存され、以後の各セッションで持続します。
このプロパティが False に設定されている場合、現在の図面の外部参照に依存した画層に対する変更は現在のセッションでのみ有効であり、図面と一緒には保存されません。現在の図面がもう一度開かれると、画層テーブルは参照図面から再ロードされ、現在の図面はその設定を反映します。影響を受ける画層の設定は、表示/非表示、フリーズ/フリーズ解除、色、線種です。この設定では、ネストした外部参照パスへの変更は現在のセッションでのみ有効であり、図面と一緒には保存されません。
VBA:
Sub Example_XRefLayerVisibility()
' This example reads and modifies the preference value that controls
' the visibility of xref-dependent layers and specifies if nested xref
' path changes are saved.
'
' When finished, this example resets the preference value back to
' its original value.
Dim ACADPref As AcadDatabasePreferences
Dim originalValue As Variant, newValue As Variant
' Get the user preferences object
Set ACADPref = ThisDrawing.preferences
' Read and display the original value
originalValue = ACADPref.XRefLayerVisibility
MsgBox "The XRefLayerVisibility preference is set to: " & originalValue
' Modify the XRefLayerVisibility preference by toggling the value
ACADPref.XRefLayerVisibility = Not (ACADPref.XRefLayerVisibility)
newValue = ACADPref.XRefLayerVisibility
MsgBox "The XRefLayerVisibility 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.XRefLayerVisibility = originalValue
MsgBox "The XRefLayerVisibility preference was reset back to: " & originalValue
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_XRefLayerVisibility()
;; This example reads and modifies the preference value that controls
;; the visibility of xref-dependent layers and specifies if nested xref
;; path changes are saved.
;;
;; When finished, this example resets the preference value back to
;; its original value.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq preferences (vla-get-Preferences doc))
;; Read and display the original value
(setq originalValue (vla-get-XRefLayerVisibility preferences))
(alert (strcat "The XRefLayerVisibility preference is set to: " (if (= originalValue :vlax-true) "True" "False")))
;; Modify the XRefLayerVisibility preference by toggling the value
(vla-put-XRefLayerVisibility preferences (if (= originalValue :vlax-true) :vlax-false :vlax-true))
(alert (strcat "The XRefLayerVisibility preference has been set to: " (if (= (vla-get-XRefLayerVisibility preferences) :vlax-true) "True" "False")))
;; 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-XRefLayerVisibility preferences originalValue)
(alert (strcat "The XRefLayerVisibility preference was reset back to: " (if (= originalValue :vlax-true) "True" "False")))
)