テキスト ウィンドウの内容をログ ファイルに書き込むかどうかを指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: ブール型
このプロパティの初期値は True です。
ログ ファイルは、テキスト ウィンドウの内容をテキスト ファイルに記録します。ログ ファイルの名前を指定するには、LogFilePath プロパティを使用します。
VBA:
Sub Example_LogFileOn() ' This example returns the current setting of ' LogFileOn. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currLogFileOn As Boolean Set preferences = ThisDrawing.Application.preferences ' Retrieve the current LogFileOn value currLogFileOn = preferences.OpenSave.LogFileOn MsgBox "The current value for LogFileOn is " & preferences.OpenSave.LogFileOn, vbInformation, "LogFileOn Example" ' Change the value for LogFileOn preferences.OpenSave.LogFileOn = Not (currLogFileOn) MsgBox "The new value for LogFileOn is " & preferences.OpenSave.LogFileOn, vbInformation, "LogFileOn Example" ' Reset LogFileOn to its original value preferences.OpenSave.LogFileOn = currLogFileOn MsgBox "The LogFileOn value is reset to " & preferences.OpenSave.LogFileOn, vbInformation, "LogFileOn Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_LogFileOn() ;; This example returns the current setting of ;; LogFileOn. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current LogFileOn value (setq currLogFileOn (vla-get-LogFileOn (vla-get-OpenSave preferences))) (alert (strcat "The current value for LogFileOn is " (if (= currLogFileOn :vlax-true) "True" "False"))) ;; Change the value for LogFileOn (vla-put-LogFileOn (vla-get-OpenSave preferences) (if (= currLogFileOn :vlax-true) :vlax-false :vlax-true)) (alert (strcat "The new value for LogFileOn is " (if (= (vla-get-LogFileOn (vla-get-OpenSave preferences)) :vlax-true) "True" "False"))) ;; Reset LogFileOn to its original value (vla-put-LogFileOn (vla-get-OpenSave preferences) currLogFileOn) (alert (strcat "The LogFileOn value is reset to " (if (= (vla-get-LogFileOn (vla-get-OpenSave preferences)) :vlax-true) "True" "False"))) )