@Kevin.Spear
Apparently, two things worked to fix the issue. The second step is important, "Restart AutoCAD".
I regularly use PREVIEW to do a quick plot and I rarely remember to run my SETDEFPLOT command first (similar to the linked solution you provided). That's the problem I wanted to fix and I could not yesterday... (at least not without restarting AutoCAD which I didn't even think about). My approach:
- UNDEFINE the PREVIEW command and then redefine it via Autolisp. (preview.lsp is my redefinition). For me, this is done in a user keyed lisp file that automatically loads my specific preferences (and this is just one preference). Everyone here has one so they can preset/reset their preferences when they open a session. The acaddoc.lsp file can perform these steps too but the contents of our acaddoc.lsp are the same for all users.
- RESTART AutoCAD!
I.E.:
(COMMAND "undefine" "preview") ; undefines AutoCAD's PREVIEW command
(SETQ c:preview nil) ; just for good measure
(LOAD "preview" "\nFile PREVIEW.LSP not loaded! ") ; redefines the PREVIEW command
Now, when I issue the PREVIEW command (or PRE shortcut) the default plot to file path gets set to my specified project folder. It would not do that yesterday. Even though the lisp code was run and the definition changed, it would not execute SETDEFPLOT when I used PREVIEW.
Now, for this, my most frequent plotting method, the default plot to file path gets set first.
P.S. If any AutoCAD command gets undefined and its new definition doesn't work or you need AutoCAD's version of it, just put a period in front of the command name to invoke AutoCAD's internal definition. I.e., .PREVIEW will always invoke AutoCAD's PREVIEW command whether it has been 'undefined' or not. Command line entry is required (the COMMAND function in lisp will do it too).
AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
8.6.52.0 AutoCAD Architecture 2024