Message 1 of 4
Print to PDF no Input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
With the forums help, I was able to write a LISP that printed a DWG to PDF. Now I'm making trying to make it easier by no info needing to be entered. Such as file path or file name. My goal is to type command and have PDF made in folder of DWG. Below is what I have now.
(defun C:p1 ()
(setq sav (getfiled "Save as" (strcat (getvar "dwgprefix")(vl-filename-base (getvar 'dwgname))) "pdf" 1))
(command "-plot" "y" "" "DWG To PDF.pc3" "ANSI expand B (17.00 x 11.00 Inches)" "i" "l" "n" "w" "0,0" "34.0,22.0" "" "Center" "y" "monochrome.ctb" "y" "W" sav "N" "Y")
(princ)
)
The save as window comes up with the correct file path and file name but it still requires me to select okay. How do I get it so I don't have to select okay?
Hint: I ultimately want to add to script so I can print all open drawings. Slowely getting there.