TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: V-Man on April 02, 2019, 07:52:39 AM

Title: Please check code
Post by: V-Man on April 02, 2019, 07:52:39 AM

Hello all,

Been a while, I have this simple code that I wrote but I can't for the life of me get it to work. I need someone else's eyes to take a look at it and let me know what's going on.

Code: [Select]
(defun c:go2()
(setq dwgname (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4) ))
(setq dwgpre (getvar "dwgprefix"))
(setq filename (strcat dwgpre dwgname ".pdf"))
(COMMAND "-PLOT" "Y" "" "ADOBE PDF" "ARCH E" "Inches" "LANDSCAPE" "N" "Extents" "Fit" "0.00,0.00" "yes" "G_TEST.ctb" "Y" "A" "n" "n" fileName "N" "y")
(princ)
)

Thanks,
Title: Re: Please check code
Post by: PKENEWELL on April 02, 2019, 09:47:45 AM
Check the names of your Output device and Paper size - they must be exact naming to the names listed in the plot dialog. For example Plot size must be "ARCH E (36.00 x 48.00 Inches)", not just "ARCH E".