home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / apr94cad.zip / TIP970A.LSP < prev    next >
Lisp/Scheme  |  1994-03-11  |  2KB  |  39 lines

  1. ; TIP970A.LSP: ATXTMUN.LSP   Automatic Numbers and Letters
  2. ;                           (c)1994, Bill Bratt
  3.  
  4.    ; *****************************************************************
  5.    ;                         ATXTNUM.LSP
  6.    ; *****************************************************************
  7.    ; This AutoLISP routine is by: Bill Bratt   10-06-92
  8.    ; This function will do TEXT followed by a NUMBER
  9.    ; at any spacing and text height.
  10.    ; This can be used for room finish or door schedules where an area
  11.    ; letter is required.
  12.    ; *****************************************************************
  13.    (Defun C:ATXTNUM ( / ECH G P1 line_spac txt_ht txt s_num e_num quant num )
  14.        (Setq ECH (Getvar "Cmdecho"))
  15.        (Setq G (Getvar "Blipmode"))
  16.        (Setvar "Cmdecho" 0)
  17.        (Setvar "Blipmode" 0)
  18.  
  19.        (Setq p1 (Getpoint "\nPick Starting point: "))
  20.        (Setq line_spac (Getdist P1 "\nDistance between letters: "))
  21.        (Setq txt_ht (Getdist P1 "\nPick or Enter Text height: "))
  22.  
  23.        (setq txt (getstring nil "\nEnter Area Letter: "))
  24.        (setq s_num (getint "\nEnter Starting Number: "))
  25.        (setq e_num (getint "\nEnter Ending Number: "))
  26.        (setq quant (+ (- e_num s_num) 1))
  27.        (setq num s_num)
  28.        (repeat quant
  29.  (setq txt_num (itoa num))
  30.  (setq txtnum ( strcat txt txt_num))
  31.  (command "text" p1 txt_ht "0" txtnum)
  32.  (setq p1 (list (car p1) (- (cadr p1) line_spac))) (terpri)
  33.  (setq num (+ num 1))
  34.      )
  35.      (Setvar "Blipmode" G)
  36.      (Setvar "Cmdecho" ECH)
  37.  )
  38.  
  39.