Author Topic: Drawing default printer assign to user login  (Read 2982 times)

0 Members and 1 Guest are viewing this topic.

cparnell

  • Guest
Drawing default printer assign to user login
« on: February 26, 2004, 01:18:41 PM »
In a month or so several of us will be moved to a new area. Designers will have our high use printer/copier; we drafters will use a new printer.
My question is, user one will open Drawing A, make changes and print it to the Savin 2545. User two will open this drawing, save as, update it for a new client, and print it, however it prints to the Savin 2545 which is in a another part of the office, is there a way, (LISP) or other to have the printer assigned by the users log in name?

Matt Stachoni

  • Guest
Re: Drawing default printer assign to user login
« Reply #1 on: March 11, 2004, 12:55:14 AM »
Quote from: cparnell
In a month or so several of us will be moved to a new area. Designers will have our high use printer/copier; we drafters will use a new printer.
My question is, user one will open Drawing A, make changes and print it to the Savin 2545. User two will open this drawing, save as, update it for a new client, and print it, however it prints to the Savin 2545 which is in a another part of the office, is there a way, (LISP) or other to have the printer assigned by the users log in name?


Sure!

You first have to somehow define what users get what printers. You can do this inline with your code, but it's probably best to do it in a separate text file with each line formatted as a list, e.g., ("Bob" . "Savin2545").

Doing it as a separate text file means you can easily edit it outside of the code itself. Use read-line to read each line of the file, use (read) to convert it to a list, extract the user name and printer, and move on.

You can figure out the current user's login name via (getvar "loginname").

-Matt

cparnell

  • Guest
Drawing default printer assign to user login
« Reply #2 on: March 11, 2004, 07:44:29 AM »
Thanks for your reply.