Author Topic: Please check code  (Read 1274 times)

0 Members and 1 Guest are viewing this topic.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Please check code
« 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,
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

PKENEWELL

  • Bull Frog
  • Posts: 317
Re: Please check code
« Reply #1 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".
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt