I have written the following code and it seems to work.
In that the windows registry changes but the Autocad-->Tools-->Options-->Printer Support-->Pen Styles setting does not.
This inconsistency bewteen the windows registry and Autocad setting causes Autocad to crash when I want to plot.
How does one get Autocad to update its profile as per registry?
(Defun QCTB1 ()
(if (= vl-load-com Nil)(vl-load-com));
(setq PFL (#GET-CPROFILE)
PTH (strcat "HKEY_CURRENT_USER\\" (vlax-product-key))
REG-KEY (strcat PTH "\\Profiles\\" PFL "\\General\\")
VALUE "Z:\\FFB\\Publish\\Pen Styles\\"
CURRENT (vl-registry-write REG-KEY "PrinterStyleSheetDir" VALUE)
)
);
I have written the lisp to allows me to have only 3 ctb in my plot style options for 95% of the time, but when I need to plot a consultants drawing I will need their ctb which I would like to keep in another directory so that the wait time between pressing the plot icon button and the dialog box showing up is to a minimum.
I have found that the more ctb's and page setup styles one has the longer it takes to display the dialog box.
So only having 3 Ctbs listed in the pull down has the dialogs box displaying instantaneously as per a minute and a half because I have over 75 ctb's listed due to the various consultants I use.
Any help would be appreciated...
and thanks in advance.