Thank you! I didn't quite fully understand what was going on that code, but I got somehow got some info from it and got my code to work. If you want to take a look, it's down below.
I know this is a separate topic, but do you happen to know if there is a way to add to this LISP so that it PDFs out all the sheets as individual files with one command, with their own separate names (only difference would be the ctab name)?
i.e. dwgfilename_11x17_date
dwgfilename_24x36_date
(the paper size would be on the tab title, which is derived from "ctab")
Code:
(defun c:EP (/ dmy newpath underscore savename)
(setvar "filedia" 0)
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq summaryInfo (vla-get-SummaryInfo doc))
(vla-GetCustomByIndex summaryInfo 0 'Key0 'Value0)
(setq dmy Value0)
(setq newpath "c:/work/")
(setq underscore "_")
(setq savename
(strcat newpath
(vl-filename-base
(getvar "dwgname")
)
underscore
(getvar "ctab") underscore dmy
)
)
(command "-export"
"p"
"c"
"n"
savename)
(setvar "filedia" 1)
(princ)
)