0 Members and 1 Guest are viewing this topic.
(strcat (vla-get-DefaultPlotToFilePath (vla-get-output (vla-get-preferences (vlax-get-acad-object)) ) ) "\\" (vl-string-right-trim ".dwg" (getvar "dwgname")) "-" (getvar "ctab") ".plt")
As far as I know, the previous plot settings are stored in the registry under the current profile name -HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\< releaseno. >\< versionspec >\Profiles\< profilename >\Previous plot settings\Model - but I'm not sure if it includes a plot-to-file record. In fact, I don't think it's included.By getting the active profile from the preferences and the productkey, you can piece together a string to read the registry keys. For example:
(defun readPrevPlot () (setq prefs (vla-get-preferences (vlax-get-acad-object)) activeProfile (vla-get-activeprofile (vla-get-profiles prefs)) acadkey (vlax-product-key) ) (setq keyString (strcat "HKEY_CURRENT_USER\\" acadkey "\\Profiles\\" activeProfile "\\Previous plot settings")) (princ (strcat "\nLast plot configuration file, model: " (cond ((vl-registry-read (strcat keyString "\\Model") "Cfg Name")) ("None")))) (princ (strcat "\nLast plot configuration file, layout: " (cond ((vl-registry-read (strcat keyString "\\Layout") "Cfg Name")) ("None")))) (princ))