I have created this lisp to plot layouts to a plt file. It works perfectly. I modified the lisp to plot to a pdf and i get this error:
Lisp file:
(defun c:plot-pdf (/ layoutname layt_lst)
(vl-load-com)
(vlax-for layt (vla-get-layouts (vla-get-ActiveDocument (vlax-get-acad-object)))
(if (> (vla-get-TabOrder layt) 0)
(setq layt_lst (cons (cons (vla-get-TabOrder layt) (vla-get-Name layt)) layt_lst))
)
)
(setq layt_lst (vl-sort layt_lst '(lambda (x y) (< (car x) (car y)))))
(foreach layt layt_lst
(setq layoutname (cdr layt))
;
(setq dname (getvar "dwgname"))
(setq projname (substr dname 1 4))
(setq date (rtos (getvar "cdate") 2 6))
(setq year (substr date 1 4))
(setq month (substr date 5 2))
(setq day (substr date 7 2))
(setq location1 (strcat "Q:\\RCMA RESOURCES\\Plots Temp\\" projname " (" year "-" month "-" day ")"))
(vl-mkdir location1)
(setq location2 (strcat location1 "\\" projname "Plotfile"))
(vl-mkdir location2)
(setq location3 (strcat location1 "\\" projname "PDF"))
(vl-mkdir location3)
(setq plotdir location2)
(setq pdfdir location3)
(setq plotname layoutname)
(setq location (strcat plotdir "\\" plotname))
(setq location-b (strcat pdfdir "\\" plotname))
;
(command "-plot"
"yes";DETAILED PLOT
layoutname
"DWG To PDF.pc3";PLOTTER NAME
"ARCH D (24.00 x 36.00 Inches)";PAPER SIZE
"inches";PAPER UNITS
"landscape";ORIENTATION
"no";PLOT UPSIDEDOWN
"extents";PLOT AREA
"1:1";PLOT SCALE
"center";PLOT OFFSET
"yes";USE PLOT SYTLES
"RCMA-FULL.CTB";PLOT STYLE NAME
"yes";PLOT LINEWEIGHTS
"no";SCALE LINEWEIGHTS
"no";PAPER SPACE FIRST
"No";HIDE PAPER SPACE
"Yes";PLOT TO FILE
location-b
"yes";SAVE PAGE SETUP
"yes";PROCEDE WITH PLOT
)
;
)
(princ)
)
Error I am getting:
-plot Detailed plot configuration? [Yes/No] <No>: yes
Enter a layout name or [?] ❤️ SITE DETAILS>: 3 SITE DETAILS Enter an output device name or [?] <DWG To PDF.pc3>: DWG To PDF.pc3 Enter paper size or [?] <ARCH D (24.00 x 36.00 Inches)>: ARCH D (24.00 x 36.00 Inches) Enter paper units [Inches/Millimeters] <Inches>: inches Enter drawing orientation [Portrait/Landscape] <Landscape>: landscape Plot upside down? [Yes/No] <No>: no Enter plot area [Display/Extents/Limits/View/Window] <Extents>: extents Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <1:1>: 1:1 Enter plot offset (x,y) or [Center] <Center>: center Plot with plot styles? [Yes/No] <Yes>: yes Enter plot style table name or [?] (enter . for none) <RCMA-FULL.CTB>: RCMA-FULL.CTB Plot with lineweights? [Yes/No] <Yes>: yes Scale lineweights with plot scale? [Yes/No] <No>: no Plot paper space first? [Yes/No] <No>: no Hide paperspace objects? [Yes/No] <No>: No
Enter file name <Q:\RCMA RESOURCES\1 CAD Management\C3D STYLES\Test Project\6 CAD Files\4 Plan Sheets\TEST 03 DET1-3 SITE DETAILS.pdf>: Yes Save changes to page setup [Yes/No]? <N> Q:\RCMA RESOURCES\Plots Temp\TEST (2016-10-07)\TESTPDF\3 SITE DETAILS
Yes or No, please.
error: Function cancelledSave changes to page setup [Yes/No]? <N> *Cancel*
Does anyone have any ideas?
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.