- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Ive been working and asking for help about this auto plot lisp. It works perfectly no problems but it sends the pdf to the folder the dwg file is in which is fine but it would be far more convenient if it saved to a different folder. I know how to change the location to a subfolder in the current dwg's folder but as far as going up to a previous folder, that is what I cant seem to find and ive been looking through all forums to get my solution but none.
To best understand where im trying to save the pdf file, my office creates a separate folder for each project and name it by its "address", in the address folder> there is a subfolder called "CAD" where the drawing is, and another sub folder called "PDF", where a > subsub folder "Preliminary Design" is where they go to be separated by specific submittals and its in this folders that I want the pdf to save to not the "CAD" folder.
"CAD" > dwg file (current location)
"ADDRESS">
"PDF"> "Preliminary Design"(desired folder)
The issue is that the pdfs are saving into the "cad" folder and its the dwgprefix part of the equation that can differentiate the specific job the pdfs are coming from and save it to the dwg files location but how do I specify from that starting point to go up to the previous folder, the "address" folder and into the "PDF" folder and down deeper into the sub folder called "Preliminary Design". I have used a lisp that does just this before but when I left that office I didn't copy that command for myself and I regret it, so if anyone can understand and be able to figure out how to do this id really appreciate it.
Below is the list, mind the plot style:
(defun c:dpdf (/ file)
(setvar "cmdecho" 1)
(setq file (strcat (getvar 'DWGPREFIX) (substr (setq dwg (getvar 'DWGNAME)) 1 (- (strlen dwg) 4)) ".pdf"))
(if (findfile file)(vl-file-delete file))
(command "-plot" "yes" "" "DWG TO PDF.PC3" "ARCH D (24.00 x 36.00 Inches)" "Inches" "Landscape" "yes" "window" "0,0" "36,24" "1:1" "0,0" "yes" "SCD SHADER.stb" "yes" "no" "yes" "no" (getvar "CTAB") "No" "yes")
)
Solved! Go to Solution.