Specifies the directory in which AutoCAD looks for ADI device drivers for the video display, pointing devices, printers, and plotters.
Supported platforms: Windows only
VBA:
object.DriversPath
Type: PreferencesFiles
The object this property applies to.
Read-only: No
Type: String
The directory in which the device drivers are located. Specify a drive letter and path for each path. Separate multiple directory listings with a semicolon (;).
No additional remarks.
VBA:
Sub Example_DriversPath()
' This example returns the current setting of
' DriversPath. It then changes the value, and finally
' it resets the value back to the original setting.
Dim preferences As AcadPreferences
Dim currDriversPath As String
Dim newDriversPath As String
Set preferences = ThisDrawing.Application.Preferences
' Retrieve the current DriversPath value
currDriversPath = preferences.Files.DriversPath
MsgBox "The current value for DriversPath is " & currDriversPath, vbInformation, "DriversPath Example"
' Change the value for DriversPath
newDriversPath = "TestDriversPath"
preferences.Files.DriversPath = newDriversPath
MsgBox "The new value for DriversPath is " & newDriversPath, vbInformation, "DriversPath Example"
' Reset DriversPath to its original value
preferences.Files.DriversPath = currDriversPath
MsgBox "The DriversPath value is reset to " & currDriversPath, vbInformation, "DriversPath Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_DriversPath()
;; This example returns the current setting of
;; DriversPath. 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 DriversPath value
(setq currDriversPath (vla-get-DriversPath (vla-get-Files preferences)))
(alert (strcat "The current value for DriversPath is " currDriversPath))
;; Change the value for DriversPath
(setq newDriversPath "TestDriversPath")
(vla-put-DriversPath (vla-get-Files preferences) newDriversPath)
(alert (strcat "The new value for DriversPath is " newDriversPath))
;; Reset DriversPath to its original value
(vla-put-DriversPath (vla-get-Files preferences) currDriversPath)
(alert (strcat "The DriversPath value is reset to " currDriversPath))
)