Well, with much help from others esp. Tom D. this is what I've got. It seems to work well. It takes a drawing number from a list and prints it in the bottom right corner of the drawing, then updates the list for the next user. It also creates the list if none exists. Thanks all, Chuck (defun c:dnum () (setq dp (getvar "DWGPREFIX")) ;returns the current drive and directory of the drawing (setq filename (strcat dp "drawing numbers.txt")) ;creates the file in the "dp" directory (if (setq ofil (open filename "r")) (progn (while (setq nxtlin (read-line ofil)) (setq lastnum nxtlin) ) ;while (setq increment (1+ (atoi lastnum))) (close ofil) ) ;progn, then (setq increment 1) ) ;if (setq ofil (open filename "a")) ;if it doesn't exist, it will be created (write-line (itoa increment) ofil) (close ofil) (setq a (getvar "TEXTSIZE")) (setq x (/ a 2)) ;sets the vertical offset to textsize/2 (setq a (- (car (getvar "limmax")) a)) ;sets the horizontal offset to limmax-textsize bottom-right justified (command "text" "j" "br" (list a x) "" "" lastnum) ;prints the dnumber at the predetmined co-ordinates )