×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Date stamp with user's name

Date stamp with user's name

Date stamp with user's name

(OP)
My company has recently started to use the ddts.lsp routine to place the file path, date and time on drawings, they are now looking for a way to modify the lisp routine to include the users' login name also, The current routine is as follows:

;;; *****  DDTS.LSP  *****
;;;
;;; Places Drawing name, Date and Time Stamp at lower left corner of drawing
;;;
(defun c:DDTS (/ CE AP CL DP DN CD MX HR MN LM LX DX TH DS MO YR TS TM UN TX OSM)
   (setq OSM (getvar "OSMODE"))
   (setvar "OSMODE" 0)
   (setq CE (getvar "CMDECHO"))
   (setvar "CMDECHO" 0)
   (setq TS (getvar "TEXTSIZE"))
   (setq AP "AM"
         CL (getvar "CLAYER")
         DP (getvar "DWGPREFIX")
         DN (getvar "DWGNAME")
         UN (GETENV "U")
         CD (rtos (getvar "CDATE") 2 4)
         MX (atoi (substr CD 5 2))
         HR (atoi (substr CD 10 2))
         MN (substr CD 12 2)
         LM (getvar "LIMMIN")
         LX (getvar "LIMMAX")
         DX (distance LM LX)
         TH (/ DX 552)
         DS (polar LM (/ pi 5) (/ DX 60))
;;;DS (polar LM (/ pi 6) (/ DX 100))  [orig]
         MO (nth MX '(nil "JAN" "FEB" "MAR" "APR" "MAY" "JUN"
                          "JUL" "AUG" "SEP" "OCT" "NOV" "DEC"))
   )
        (if (>= HR 12) (setq AP "PM"))
        (if (>= HR 13) (setq HR (itoa (- HR 12))) (setq HR (itoa HR)))

   (setq YR (strcat "DATE: " MO " " (substr CD 7 2) ", " (substr CD 1 4)))
   (setq TM (strcat "DWG. NAME: " DP "" DN "  " YR "  TIME: " HR ":" MN " " AP))
   (command ".LAYER" "T" "DATESTAMP" "")
   (command ".LAYER" "N" "DATESTAMP" "C" "7" "DATESTAMP" "S" "DATESTAMP" "")
   (setq TX (ssget "X" (list (cons 8 "DATESTAMP"))))
   (command ".ERASE" TX ""
            ".STYLE" "STANDARD" "" "0" "1" "0" "N" "N" "N"
            ".TEXT" DS TH "0" TM
            ".LAYER" "S" CL ""
   )
   (setvar "CMDECHO" CE)
   (setvar "TEXTSIZE" TS)
   (print)
   (print TM)
   (setvar "OSMODE" OSM)
   (command "qsave")
   (princ)
   )
 They would like it to appear between the file name and time and I'm not certain what variable to use to pull the login name from the computer. Any help would be greatly appreciated.

Thanks,
  Don

RE: Date stamp with user's name

(OP)
I forgot to mention, the reason that we don not use the plotstamp feature in Autocad is that they like having the name and date information physically in the file as a way to verify the markup matches the file.
    Thanks again,
      Don

RE: Date stamp with user's name

Hi Don,

what about "rtext" from the Express Tools V 1-9???
We use it!

Lothar

ADT 2004
ACAD 2002

RE: Date stamp with user's name

Try (Getvar LoginName)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources