0 Members and 1 Guest are viewing this topic.
(vl-load-com)(setq PreferenceFiles (vla-get-files (vla-get-preferences (vlax-get-acad-object))));print/plotter settings(setq AddPrintPath (strcat "n:\\cad_support\\plotter"))(setq CurrentPrintPath (strcat (vla-get-PrinterConfigPath PreferenceFiles)))(setq NewPrintPath (strcat AddPrintPath";"CurrentPrintPath))(vla-put-printerconfigpath PreferenceFiles NewPrintPath)
Automation Error. Invalid Argument
I don't see anything wrong with your code - perhaps there is a bug with the ActiveX printerconfigpath property.Try the following alternative method, changing the registry value directly:Code - Auto/Visual Lisp: [Select](setq new "n:\\cad_support\\plotter" cur (getenv "PrinterConfigDir"))(if (not (vl-string-search (strcase new) (strcase cur))) (setenv "PrinterConfigDir" (strcat new ";" cur)))
Not sure why you are pulling the old config path?