Simple Numeric Array
; Example from book: Visual Lisp Programming
; NumRow.lsp by Cal Clater
;
; 1/12/xx
;
; Purpose: To create an evenly spaced row of incrementally increasing numbers,
; such as might be required for a chart or graph. The beginning number is zero
; and the last number is as specified.
;
(defun C:NumRow (/ PT1 DST DIR NN HN)
(setvar "CMDECHO" 0) (setvar "BLIPMODE" 0)
(princ "\nText will be center justified.")
(setq PT1 (getpoint "\nstart point of number row: ")
DST (getdist "\nDistance between number: ")
DIR (getorient "\nAngle: ")
NN 0
HN (getint "\nNumber sequence to be 0 through: ")
)
(command "TEXT" "C" PT1 "" "" "0")
(repeat HN
(setq PT1 (polar PT1 DIR DST))
(command "TEXT" "C" PT1 "" "" (itoa (setq NN (+ NN 1))))
)
)