;;;Place text with incremented numbers. ;;;Requires uutils.lsp, dimscl.lsp getstyle.lsp mklayr.lsp ;;;(and maybe some I didn't catch) ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: ;;;> EDITED: 05-22-2001 ;;; (DEFUN c:tincr () (IF (AND upoint ustr uint uangle ukword) NIL (LOAD "uutils") ) ;_ end of IF (IF dimscl NIL (LOAD "dimscl") ) ;_ end of IF (dimscl) (IF getstyle nil (LOAD "getstyle") ) ;_ end of if (getstyle "A") (IF (AND txtht (EQ (TYPE txtht) 'REAL)) NIL (SETQ txtht (* 0.1 dimsc)) ) ;_ end of IF (IF (AND tnjst (MEMBER tnjst (LIST "Left" "Center" "Middle" "Right" "TL" "TC" "TR" "ML" "MC" "MR" "BL" "BC" "BR")) ) ;_ end of AND NIL (SETQ tnjst "Left") ) ;_ end of IF (IF (AND pre_txt (EQ (TYPE pre_txt) 'STR)) NIL (SETQ pre_txt "") ) ;_ end of IF (IF (AND pos_txt (EQ (TYPE pos_txt) 'STR)) NIL (SETQ pos_txt "") ) ;_ end of IF (IF (AND bas_no (EQ (TYPE bas_no) 'INT)) NIL (SETQ bas_no 1) ) ;_ end of IF (IF (AND incr_no (EQ (TYPE incr_no) 'INT)) NIL (SETQ incr_no 1) ) ;_ end of IF (SETQ incr_cnt 1 label_no bas_no ) ;_ end of SETQ (WHILE (SETQ inspt (upoint 0 "Options" "/Options" nil nil ) ;_ end of upoint ) ;_ end of setq (COND ((EQ inspt "Options") (WHILE (NOT (EQ (SETQ tincr_opt (ukword 1 "Justify Height Prefix Suffix Base Increment Cancel" "Select Option:/Justify/Height/Prefix/Suffix/Base/Increment/Cancel/" (IF tincr_opt tincr_opt NIL ) ;_ end of IF ) ;_ end of ukword ) ;_ end of SETQ "Cancel" ) ;_ end of EQ ) ;_ end of NOT (COND ((EQ tincr_opt "Justify") (SETQ tnjst (ukword 1 "Left Center Middle Right TL TC TR ML MC MR BL BC BR" "Left/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR" (IF tnjst tnjst "L" ) ;_ end of if ) ;_ end of ukword ) ;_ end of setq ) ((EQ tincr_opt "Height") (IF txtsize nil (LOAD "txtsize") ) ;_ end of if (txtsize nil) ) ((EQ tincr_opt "Prefix") (SETQ pre_txt (ustr 1 "Number prefix" (IF pre_txt pre_txt "" ) ;_ end of if T ) ;_ end of ustr ) ;_ end of setq ) ((EQ tincr_opt "Suffix") (SETQ pos_txt (ustr 1 "Number suffix" (IF pos_txt pos_txt "" ) ;_ end of if T ) ;_ end of ustr ) ;_ end of setq ) ((EQ tincr_opt "Base") (SETQ bas_no (uint 1 "" "Base Number" (IF bas_no bas_no 1 ) ;_ end of if ) ;_ end of uint label_no bas_no incr_cnt 1 ) ;_ end of setq ) ((EQ tincr_opt "Increment") (SETQ incr_no (uint 1 "" "Number increment" (IF incr_no incr_no 1 ) ;_ end of if ) ;_ end of uint ) ;_ end of setq ) ) ;_ end of COND ) ;_ end of WHILE ) (inspt (IF (EQ tnjst "Left") (COMMAND ".text" inspt txtht (- 0 (GETVAR "viewtwist")) (STRCAT pre_txt (ITOA label_no) pos_txt) ) ;_ end of COMMAND (COMMAND ".text" "j" tnjst inspt txtht (- 0 (GETVAR "viewtwist")) (STRCAT pre_txt (ITOA label_no) pos_txt) ) ;_ end of COMMAND ) (SETQ label_no (+ bas_no (* incr_no incr_cnt)) incr_cnt (1+ incr_cnt) ) ;_ end of SETQ ) ) ;_ end of cond ) ;_ end of while (getstyle "") ) ;_ end of defun ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 2 0 nil nil nil T T) ***Don't add text below the comment!***|;