Message 1 of 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I need help with a lisp command and i cant wrap my brain around this one. With help i put this lisp together for work and it works great plotting all paperspace layout tabs. I also have another that plots the current paperspace layout. What I need help with is adjusting this lisp command to plot selected layouts. Say I need only 5 sheets plotted i select the 5 tabs of the layouts i want to plot and type the command and they plot. Alot easier than going to the 5 pages or plotting all 20 pages.
Here is the lisp im working with:
(defun c:SPDF (/ up_folder ; local function
file)
(defun up_folder (prefix / p)
(if (setq p (vl-string-search (strcase "\\cad\\") (strcase prefix)))
(substr prefix 1 p)
)
); up_folder
(foreach lay (layoutlist)
(setvar 'CTab lay)
(setq file (strcat (up_folder (getvar 'DWGPREFIX)) "\\pdf\\Preliminary Design\\" (substr (setq dwg (getvar 'DWGNAME)) 1 (- (strlen dwg) 4)) ".pdf"))
;;The above line Creating the PDF File name, According to "Layout" Name
(setvar "PLOTTRANSPARENCYOVERRIDE" 2)
(COMMAND "-PLOT"
"Yes" ;Detailed plot configuration?
"" ;Get a layout name
"DWG To PDF.pc3" ;Enter an output device name
"ARCH D (24.00 x 36.00 INCHES)" ;Enter paper size
"inches" ;Enter paper units
"Landscape" ;Enter drawing orientation
"No" ;Plot upside down?
"window" ;Enter plot area
"0,0"
"36,24"
"1:1" ;Enter plot scale
"0,0" ;Enter plot offset (x,y)
"Yes" ;Plot with plot styles?
"SCD SHADER.stb" ;Enter plot style table name or
"yes" ;Plot with lineweights?
"No" ;Scale lineweights with plot scale?
"yes" ;Plot paper space first?
"No" ;Hide paperspace objects?
(setq file (strcat (up_folder (getvar 'DWGPREFIX)) "\\pdf\\Preliminary Design\\" (getvar "CTAB") ".pdf")) ;Name of file
"No" ;Save changes to page setup
"yes" ;Proceed with plot
)
)
)
Solved! Go to Solution.