LogFilePath Property (ActiveX)

Specifies the location for the log file.

Supported platforms: Windows only

Signature

VBA:

object.LogFilePath
object

Type: PreferencesFiles

The object this property applies to.

Property Value

Read-only: No

Type: String

The drive and path for the log file.

Remarks

Use the LogFileOn property to enable or disable log file capabilities.

Note: The value for this property is stored in the LOGFILEPATH system variable.

Examples

VBA:

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