Specifies the location of external reference files.
Supported platforms: Windows only
VBA:
object.TempXRefPath
Type: PreferencesFiles
The object this property applies to.
Read-only: No
Type: String
The drive and path of the directory to search for external reference files.
This location is used for the copy of the external reference if you choose acEnableWithCopy demand loading on the XRefDemandLoad property.
VBA:
Sub Example_TempXRefPath() ' This example returns the current setting of ' TempXRefPath. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currTempXRefPath As String Dim newTempXRefPath As String Set preferences = ThisDrawing.Application.preferences ' Retrieve the current TempXRefPath value currTempXRefPath = preferences.Files.TempXrefPath MsgBox "The current value for TempXRefPath is " & currTempXRefPath, vbInformation, "TempXRefPath Example" ' Change the value for TempXRefPath newTempXRefPath = "TestTempXRefPath" preferences.Files.TempXrefPath = newTempXRefPath MsgBox "The new value for TempXRefPath is " & newTempXRefPath, vbInformation, "TempXRefPath Example" ' Reset TempXRefPath to its original value preferences.Files.TempXrefPath = currTempXRefPath MsgBox "The TempXRefPath value is reset to " & currTempXRefPath, vbInformation, "TempXRefPath Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_TempXRefPath() ;; This example returns the current setting of ;; TempXRefPath. 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 TempXRefPath value (setq currTempXRefPath (vla-get-TempXrefPath (vla-get-Files preferences))) (alert (strcat "The current value for TempXRefPath is " currTempXRefPath)) ;; Change the value for TempXRefPath (setq newTempXRefPath "TestTempXRefPath") (vla-put-TempXrefPath (vla-get-Files preferences) newTempXRefPath) (alert (strcat "The new value for TempXRefPath is " newTempXRefPath)) ;; Reset TempXRefPath to its original value (vla-put-TempXrefPath (vla-get-Files preferences) currTempXRefPath) (alert (strcat "The TempXRefPath value is reset to " currTempXRefPath)) )