default printer

Discussion in 'AutoCAD' started by Ken Alexander, Apr 12, 2004.

  1. I know doslib has one, but in vlisp is this the only way to get the
    default printer?

    ;;;Gets default printer
    ;;;Ken Alexander 4/12/04
    (defun fmco:getprn (/ device)
    (substr
    (setq device
    (vl-registry-read "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows
    NT\\CurrentVersion\\Windows" "Device")
    )1 (vl-string-search "," device))
    )

    --
    Ken Alexander
    Acad2004
    Windows XP

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Apr 12, 2004
    #1
  2. Hi Ken,

    Not sure if it is the only way, is it failing in some
    cases? Just curious why you are looking for an
    alternate route.
     
    Jason Piercey, Apr 13, 2004
    #2
  3. Jason,

    Registry 'paths' can differ from operating versions.
    So if I can I try to avoid grabbing info from the registry.
    I'm still in the dark ages at home. (windows98)

    --
    Ken Alexander
    Acad2004
    Windows XP

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Apr 13, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.