Before I start, I'll begin by saying I'm just starting to dig into AutoLISP. And by dig in, I mean I haven't programmed in 14 years, and at that point it was an Intro to C++. I rememebr enough to understand some basics, but not much beyond that.
Ok, so here's the issue:
I am working on some basic LISP routines to help automate startups and support paths for the company (only 10 CAD users). One of the issues I'm trying to solve is for the users that have laptops. They often go to job sites, and require a different set of PC3 files than within the office. The workflow I think would work (again, I'm just getting started), is using acad.lsp file to run a series of other batch and lisp routines. One .lsp is dedicated to the plotter support paths.
I am trying to accomodate the laptop users by giving them basically 2 plotter config locations - one on the server for all the "in house" plotting, and one on their local drive for the "jobsite" plotting. Here's what my code looks like:
(setenv "PrinterConfigDir" "X:\\CADD\\Plotters" "C:\\CADD\\Plotters") (setenv "PrinterStyleSheetDir" "X:\\CADD\\Plot Styles" "C:\\CADD\\Plot Styles") (setenv "PrinterDescDir" "X:\\CADD\\Plotters\\PMP Files" "C:\\CADD\\Plotters\\PMP")
It appears that the second path (local) is replacing the first path (server).
How can I have this routine add two paths for each of the settings?
Thanks in advance,
Shawn
Solved! Go to Solution.
Solved by Shneuph. Go to Solution.
Instead of passing 2 separate strings try putting the paths together with a semicolon inbetween like:
(setenv "PrinterConfigDir" "X:\\CADD\\Plotters;C:\\CADD\\Plotters")
Using the method described here, a semicolon between the paths works. I can't speak for using (setenv)
Example:
;; Example of setting two paths, the second path here is just C:\ ;; Set path for plotters (vla-put-PrinterConfigPath *myFiles* (strcat SERVER_NAME "\\CAD\\AutoCADPrinters;c:\\")) ;; Set path for plot styles (vla-put-PrinterStyleSheetPath *myFiles* (strcat SERVER_NAME "\\CAD\\PLOT STYLES;c:\\")) ;; Set path for printer Descriptions (vla-put-PrinterDescPath *myFiles* (strcat SERVER_NAME "\\CAD\\AutoCADPrinters\\PMP FILES;c:\\"))
Setenv should do the trick. Just remember that it is writing to the registry and they 'key' is case sensitive.
(setenv "PrinterConfigDir" "X:\\CADD\\Plotters;C:\\CADD\\Plotters")
http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-6956.htm