指定日志文件的位置。 支持的平台:仅窗口 属性值只读:不 类型:字符串 日志文件的驱动器和路径。 言论使用该属性启用或禁用日志文件功能。LogFileOn 注意:此属性的值存储在 LOGFILEPATH 系统变量中。
例子工 务 局: Sub Example_LogFilePath()
' This example returns the current setting of
' LogFilePath. It then changes the value, and finally
' it resets the value back to the original setting.
Dim preferences As AcadPreferences
Dim currLogFilePath As String
Dim newLogFilePath As String
Set preferences = ThisDrawing.Application.preferences
' Retrieve the current LogFilePath value
currLogFilePath = preferences.Files.LogFilePath
MsgBox "The current value for LogFilePath is " & currLogFilePath, vbInformation, "LogFilePath Example"
' Change the value for LogFilePath
newLogFilePath = "C:/AutoCAD/"
preferences.Files.LogFilePath = newLogFilePath
MsgBox "The new value for LogFilePath is " & newLogFilePath, vbInformation, "LogFilePath Example"
' Reset LogFilePath to its original value
preferences.Files.LogFilePath = currLogFilePath
MsgBox "The LogFilePath value is reset to " & currLogFilePath, vbInformation, "LogFilePath Example"
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_LogFilePath()
;; This example returns the current setting of
;; LogFilePath. 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 LogFilePath value
(setq currLogFilePath (vla-get-LogFilePath (vla-get-Files preferences)))
(alert (strcat "The current value for LogFilePath is " currLogFilePath))
;; Change the value for LogFilePath
(setq newLogFilePath "C:/AutoCAD/")
(vla-put-LogFilePath (vla-get-Files preferences) newLogFilePath)
(alert (strcat "The new value for LogFilePath is " newLogFilePath))
;; Reset LogFilePath to its original value
(vla-put-LogFilePath (vla-get-Files preferences) currLogFilePath)
(alert (strcat "The LogFilePath value is reset to " currLogFilePath))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 06:01
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.