- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone, Good day to all, Im a beginner with lisp knowledge
I'm trying to customize a LISP routine to create PDFs using my own .pc3 and ctb file — specifically, I'm using "Foxit PDF Editor Printer.pc3". I tried replacing the default printer and setting a custom paper size, but the code isn’t working as expected.
(defun c:PDF ( / cm )
(setq cm (getvar 'CMDECHO))
(setvar 'CMDECHO 0)
(command "_.-plot" "_y"
(if (= 1 (getvar 'TILEMODE)) "Model" (getvar 'CTAB))
"AutoCAD PDF (High Quality Print).pc3" "ARCH D (24.00 x 36.00 Inches)"
"_M" "_L" "_N" "_E" "_F" "_C" "_Y" "monochrome.ctb" "_Y"
)
(if (= 1 (getvar 'TILEMODE))
(command "_A")
(command "_N" "_Y")
)
(command "_N" (strcat (getvar 'DWGPREFIX) (vl-filename-base (getvar 'DWGNAME))) "_Y" "_Y")
(setvar 'CMDECHO cm)
(princ)
)
(vl-load-com) (princ)
When I replace the default .pc3 file in the LISP code with my own (Foxit PDF Editor Printer.pc3), instead of plotting automatically, it starts asking for every input again — like paper size, plot area, etc
As below 👇
Command: PDF
Yes or No, please.
Don't use Esc while using a Lisp commandWrite the plot to a file [Yes/No] <N>: y
Command: MOPRINT
Yes or No, please.
Don't use Esc while using a Lisp commandWrite the plot to a file [Yes/No] <N>:
Save changes to page setup [Yes/No]? <N>
Proceed with plot [Yes/No] <Y>:
Effective plotting area: 903.11 wide by 603.25 high
Plotting viewport 1.
Effective plotting area: 792.73 wide by 577.98 high
Plotting viewport 2.
Also, it would be awesome if we could add a feature where each layout gets plotted using a name format and save location pulled from an Excel file. That would seriously save a ton of time and effort. Thanks in advance, friends!
Solved! Go to Solution.