Lisp to Print from Layout to a specific folder

Lisp to Print from Layout to a specific folder

Anonymous
Not applicable
1,722 Views
3 Replies
Message 1 of 4

Lisp to Print from Layout to a specific folder

Anonymous
Not applicable

Hi,

I have a lisp that allows me to print my layouts together but it puts them in the folder of the path of the drawing. I need the pdf's to be saved to another folder. This is what I have so far. I appreciate the help.  

The path of the folder I need it to be saved to is = C:/PDF/

 

(defun c:PDF ()
(foreach lay (layoutlist)
(setvar 'CTab lay)


(COMMAND "-PLOT"
"Y"
""
"DWG To PDF.pc3"
"ANSI full bleed B (11.00 x 17.00 Inches)"
"Inches"
"LANDSCAPE"
"N"
"E"
"f"
"C"
"Y"
"KA-PLOT-2018.ctb"
"Y"
"N"
"N"
"N"
""
"N"
"y" )
)
)

 

0 Likes
Accepted solutions (1)
1,723 Views
3 Replies
Replies (3)
Message 2 of 4

Luís Augusto
Advocate
Advocate

Maybe this program might interest you.

http://www.theswamp.org/index.php?topic=54482.0

0 Likes
Message 3 of 4

dbhunia
Advisor
Advisor
Accepted solution

Try this.....(First create the folder)

 

(defun c:PDF ()

(setq dwgN (getvar "dwgname"))
(setq fsl (strlen dwgn))
(Setq Fsl (- fsl 4))
(setq Fname (substr dwgn 1 fsl))
(foreach lay (layoutlist) (setvar 'CTab lay) (setq path (strcat "C:\\pdf\\" Fname "_" (getvar 'ctab) ".pdf")) (COMMAND "-PLOT" "Y" "" "DWG To PDF.pc3" "ANSI full bleed B (11.00 x 17.00 Inches)" "Inches" "LANDSCAPE" "N" "E" "f" "C" "Y" "KA-PLOT-2018.ctb" "Y" "N" "N" "N" path "N" "y" ) ) )

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 4 of 4

Anonymous
Not applicable

worked great, thanks a lot

 

0 Likes