;;==================================== ;; CutePDF Writer plot config routine ;; Written by Jason Rhymes www.acadianagraphics.com ;; / Dec-16-2009 / v1.0 ;; Works with CutePDF Writer version 2.8 or greater ;; Gives you the option of emailing and/or viewing ;; the pdf after it's created. ;; Prints to the current document path ;; Must have a CutePDF Writer.pc3 ;;===================================== (defun c:plotcutepdf (/) (vl-load-com) (setq curecho (getvar "cmdecho")) (setvar "cmdecho" 0) (setq emailPDF (vl-registry-read "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "EmailPDF")) (setq ViewPDF (vl-registry-read "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "ViewPDF")) (initget "Yes No") (setq email (getkword (strcat "Email PDF? [Yes/No] ""<" (if (= emailPDF "1") "Yes" "No") ">"" "))) (initget "Yes No") (setq view1 (getkword (strcat "View PDF when finished? [Yes/No] ""<" (if (= ViewPDF "1") "Yes" "No") ">"" "))) (if (= nil email) (setq email (if (= emailPDF "1") "Yes" "No")) ) (if (= "Yes" email) (vl-registry-write "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "EmailPDF" "1") (vl-registry-write "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "EmailPDF" "0") ) (if (= nil view1) (setq view1 (if (= ViewPDF "1") "Yes" "No")) ) (if (= "Yes" view1) (vl-registry-write "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "ViewPDF" "1") (vl-registry-write "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "ViewPDF" "0") ) ;;============================ ;; Set the following plot command up as needed (command ".plot" "Y" ;;Detailed plot configuration? "" ;;Enter a layout name "CutePDF Writer.pc3" ;;Enter an output device name "Tabloid" ;;Enter paper size "Inches" ;;Enter paper units "Landscape" ;;Enter drawing orientation "No" ;;Plot upside down? "Layout" ;;Enter plot area "1:1" ;;Enter plot scale (Plotted Inches=Drawing Units) "" ;;Enter plot offset (x,y) "Yes" ;;Plot with plot styles? "monochrome.ctb" ;;Enter plot style table name "Yes" ;;Plot with lineweights? "No" ;;Scale lineweights with plot scale? "No" ;;Plot paper space first? "No" ;;Hide paperspace objects? "No" ;;Write the plot to a file "No" ;;Save changes to page setup "Yes" ;;Proceed with plot ) ;;============================ (setq title (vl-registry-read "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "Title")) (vl-registry-write "HKEY_CURRENT_USER\\Software\\Acro Software Inc\\CPW" "Filename" title) (setvar "cmdecho" curecho) (princ) )