Gets the Preferences object.
Supported platforms: Windows only
Signature
VBA:
object.Preferences
- object
-
Type: Application, Database, Document
The objects this property applies to.
Property Value
Read-only: Yes
Type: DatabasePreferences, Preferences
The DatabasePreferences or Preferences object.
Remarks
The Preferences object holds the options from the Options dialog that reside in the registry. Options that reside in the drawing can be found through the DatabasePreferences object.
Examples
VBA:
Sub Example_Preferences() ' This example returns the current setting of ' LogFilePath from the preferences object. Dim preferences As AcadPreferences Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current LogFilePath value MsgBox "The current value for LogFilePath is " & preferences.Files.LogFilePath, , "Preferences Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_Preferences() ;; This example returns the current setting of ;; LogFilePath from the preferences object. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current LogFilePath value (alert (strcat "The current value for LogFilePath is " (vla-get-LogFilePath (vla-get-Files preferences)))) )