Automatically save PDF as paper space tab names

Automatically save PDF as paper space tab names

jcr96
Contributor Contributor
1,027 Views
3 Replies
Message 1 of 4

Automatically save PDF as paper space tab names

jcr96
Contributor
Contributor

Im having trouble finishing this lisp. It works perfectly but I have to manually delete the project name from the PDFs name for each PDF I create. Below is the lisp, can someone solve this problem for me. I know it has to do with the input colored red which at the moment is blank.

 

 

; dpdf.lsp will create pdf from dwg using parameters specified in code
(defun c:dpdf (/ file)
  (setvar "cmdecho" 1)
  (setq file (strcat (getvar 'DWGPREFIX) (substr (setq dwg (getvar 'DWGNAME)) 1 (- (strlen dwg) 4)) ".pdf"))
  (if (findfile file)(vl-file-delete file))
  (command "-plot" "yes" "" "DWG TO PDF.PC3" "ARCH D (24.00 x 36.00 Inches)" "Inches" "Landscape" "yes" "window" "0,0" "36,24" "1:1" "0,0" "yes" "SCD SHADER.stb" "yes" "no" "yes" "no" "" "No" "yes")
)

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

Sea-Haven
Mentor
Mentor

Have a look at this plot pdf it plots a range of layouts, the Multi getvals.lsp is a dcl Library routine needed for input.

 

 

0 Likes
Message 3 of 4

Moshe-A
Mentor
Mentor

@jcr96  hi,

 

the only thing is found is that the last 2 arguments "No" "Yes" are redundant

make sure you have the "SCD SHADER.stb" named plot style.

 

moshe

 

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

That input you've highlighted should correspond to the name of the pdf you are plotting. If you leave it blank it will use the autocad default of drawing name plus layout name, if you want it to just be the layout name try replacing the "" with (getvar "CTAB")

0 Likes