;Lotno.lsp ;This is a program to insert incremented lot numbers ;using current text. ;Created by David Perry 8/15/93 ;; Visit http://davescogo.virtualave.net/ (defun lotn ( / p p1 p2 n1 scmde) (setq n1 (getint "Enter starting lot number: ")) (setq p1 (getpoint "\nText location: ")) (setq scmde (getvar "cmdecho")) (while p1 (setvar "cmdecho" 0) (setq p2 p1) (if (= 0.0 (cdr (assoc 40 (tblsearch "style" (getvar "textstyle"))))) (command "text" "J" "MC" (setq p p1) (setq p "") (setq p "") (setq p n1) ) (command "text" "J" "MC" (setq p p1) (setq p "") (setq p n1) ) );if (setq n1 (+ n1 1)) (setq p1 (getpoint "\nText location: ")) (if (= p1 p2) (setq p1 nil)) ) (setvar "cmdecho" scmde) (princ) ) (defun C:LOTNO () (lotn) ) (princ "Type LOTNO to begin.") (princ)