Author Topic: Determine current plotter/pc3  (Read 2157 times)

0 Members and 1 Guest are viewing this topic.

Eddie D.

  • Newt
  • Posts: 29
Determine current plotter/pc3
« on: August 05, 2011, 04:45:59 PM »
Hello All,
I would like to know if there is a relatively simple way to get an open drawing's currently assigned PC3 or plotter name via AutoLisp?
I've been trying to figure this out all afternoon. I've searched this forum and the Net with no luck.
I know I've done this before, but for the life of me, I can't remember how.

Thanks!

ronjonp

  • Needs a day job
  • Posts: 7535
Re: Determine current plotter/pc3
« Reply #1 on: August 05, 2011, 05:09:13 PM »
Maybe this will help:

Code: [Select]
;;All layouts
(defun c:test nil
  (vlax-for tab (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
    (alert (strcat (vla-get-name tab) "  -  " (vla-get-configname tab)))
  )
  (princ)
)
;;Current layout
(defun c:test2 (/ tab)
  (setq tab
(vla-item (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))) (getvar 'ctab))
  )
  (alert (strcat (vla-get-name tab) "  -  " (vla-get-configname tab)))
  (princ)
)
« Last Edit: August 05, 2011, 05:13:37 PM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Eddie D.

  • Newt
  • Posts: 29
Re: Determine current plotter/pc3
« Reply #2 on: August 05, 2011, 05:12:34 PM »
Thanks ronjonp. That gets me exactly what I need!!!

ronjonp

  • Needs a day job
  • Posts: 7535
Re: Determine current plotter/pc3
« Reply #3 on: August 05, 2011, 05:14:09 PM »
Thanks ronjonp. That gets me exactly what I need!!!

Glad to help  :-)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC