;;;Place "100yr Flood El=###" and symbol at station and elevation. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 2-23-99 ;;;> EDITED: 01-17-2007 ;;; (DEFUN c:100yr () (SETVAR "cmdecho" 0) (SETQ old_ucsfollow (GETVAR "ucsfollow")) (SETVAR "ucsfollow" 0) (IF (AND (EQ (GETVAR "tilemode") 0)(EQ (GETVAR "dimscale") 1.0)) (SETVAR "dimscale" 0) ) ;_ end of if (IF (AND ureal uint ustr ukword uangle udist) NIL (LOAD "uutils") ) ;_ end of IF (IF getstyle NIL (LOAD "getstyle") ) ;_ end of IF ;;; (IF (TBLSEARCH "ucs" "pre-mlt") ;;; (PROGN ;;; (COMMAND "ucs" "s" "pre-mlt" "y") ;;; (COMMAND "ucs" "w") ;;; ) ;_ end of PROGN ;;; (PROGN (COMMAND ".ucs" "s" "pre-mlt") (COMMAND "ucs" "w")) ;;; ) ;_ end of IF ;;; (SETQ osmod (GETVAR "osmode")) ;;; (SETVAR "osmode" 0) (SETQ ;llt "-" colr "1" colra nil colri nil txht (GETVAR "textsize") numb 0 modf "NOTE" ) ;_ end of SETQ (IF dimscl nil (LOAD "dimscl") ) ;_ end of if (dimscl) (IF gvpno nil (LOAD "gvpno") ) ;_ end of if (gvpno) (IF mjrg nil (SETQ mjrg "C") ) ;_ end of IF (IF (TBLSEARCH "BLOCK" "TARGET") NIL (progn (COMMAND ".insert" "TARGET") (command) ) ) (SETQ thts (ustr 1 "\n\"Leroy Template Size\" or Standard(=110) " (IF thts thts "Standard" ) ;_ end of IF nil ) ;_ end of ustr ) ;_ end of SETQ (IF do_cmud (PROGN (SETQ cmud_color (uint 1 "" "\nNote Color number? (256=bylayer)" 256) ) ;_ end of SETQ (IF (OR (>= cmud_color 256) (<= cmud_color 0)) (COMMAND ".color" "bylayer") (COMMAND ".color" cmud_color) ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (COND ((OR (EQ (SUBSTR thts 1 1) "S") (EQ (SUBSTR thts 1 1) "s")) (SETQ txcolr (IF do_char "3" "2") lncolr (IF do_char "2" "1") ) ;_ end of SETQ ) ((<= (ATOF thts) 80) (IF do_cmud (SETQ txcolr "9" lncolr "9" ) ;_ end of SETQ (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ ) ;_ end of IF ) ((AND do_cmud (<= (ATOF thts) 100)) (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ ) ((<= (ATOF thts) 125) (IF do_cmud (SETQ txcolr "2" lncolr "2" ) ;_ end of SETQ (SETQ txcolr (IF do_char "3" "2") lncolr (IF do_char "2" "1") ) ;_ end of SETQ ) ;_ end of IF ) ((< (ATOF thts) 200) (IF do_cmud (SETQ txcolr "2" lncolr "2" ) ;_ end of SETQ (SETQ txcolr "3" lncolr "2" ) ;_ end of SETQ ) ;_ end of IF ) ((>= (ATOF thts) 200) (SETQ txcolr "5" lncolr "2" ) ;_ end of SETQ ) (thts (SETQ txcolr "2" lncolr "1" thts "110" ) ;_ end of SETQ ) ) ;_ end of COND (IF (OR (EQ (SUBSTR thts 1 1) "S") (EQ (SUBSTR thts 1 1) "s")) (SETQ txtht (* 0.110 dimsc)) (SETQ txtht (* (* (ATOI thts) 0.001) dimsc)) ) ;_ end of IF (SETVAR "TEXTSIZE" txtht) (IF do_cmud (COND ((>= (ATOF thts) 140) (COMMAND "-layer" "m" "PS" "c" "2" "PS" "") (COMMAND "-style" "ROMAND" "romand" 0 1.5 15 "N" "N" "N") ) ((>= (ATOF thts) 120) (COMMAND "-layer" "m" "PS" "c" "2" "PS" "") (COMMAND "-style" "ROMAND" "romand" 0 1 15 "N" "N" "N") ) (PROGN (COMMAND "-layer" "m" "PS" "c" "2" "PS" "") (COMMAND "-style" "SIMPLEX" "simplex" 0 1 0 "N" "N" "N") ) ) ;_ end of COND ) ;_ end of IF (SETQ dis1 txtht dis2 (* dis1 1.625) dis3 (* dis1 0.55) ) ;_ end of SETQ (IF mklayr nil (LOAD "mklayr") ) ;_ end of IF (getstyle "A") (SETQ colr lncolr) (IF do_cmud nil (c:mklayr) ) ;_ end of IF (SETQ vrt_scale (ureal 1 "" "Vertical scale factor" (IF vrt_scale vrt_scale 10 ) ;_ end of IF ) ;_ end of ureal ) ;_ end of SETQ (WHILE (/=(SETQ ins_sta (upoint 1 "Quit" "Point for marker or uit" nil nil) ;;; ins_sta (ureal 0 ;;; "Quit" ;;; "Station for marker or uit" ;;; (IF (and ins_sta(eq(type ins_sta)'REAL)) ins_sta nil) ;;; ) ;_ end of ureal ) ;_ end of Setq "Quit") (SETQ flood_el (/ (CADR ins_sta) vrt_scale) ;;; flood_el (ureal 1 ;;; "" ;;; "100 Year Flood Elevation" ;;; (if flood_el (1+ flood_el) nil) ;;; ) ;_ end of ureal ins_y (CADR ins_sta);(* flood_el vrt_scale) ins_pt ins_sta txtstr (STRCAT "100 YR FLOOD EL=" (RTOS flood_el 2 1)) ) ;_ end of SETQ (command "'.zoom" "c" ins_pt "") (SETQ txt_lst (LIST (CONS 0 "TEXT") (CONS 7 "STANDARD") (CONS 8 "C-VI013CYRF") (CONS 10 (POLAR (POLAR (TRANS ins_pt 1 0) 0 (* txtht 2)) (* PI 0.5) (* txtht 0.5) ) ;_ end of POLAR ) ;_ end of CONS (CONS 11 (TRANS (LIST 0 0 0) 1 0)) (CONS 40 txtht) (CONS 50 0) (CONS 51 0) (CONS 62 256) (CONS 1 txtstr) ) ;_ end of list bndbox (TEXTBOX txt_lst) lin_len (DISTANCE (CAR bndbox) (CADR bndbox)) lin_lst (LIST (CONS 0 "LINE") (CONS 8 "C-VI012CYRF") (CONS 10 (POLAR (TRANS ins_pt 1 0) 0 (* txtht 2))) (CONS 11 (POLAR (TRANS ins_pt 1 0) 0 (+ lin_len (* txtht 2))) ) ;_ end of CONS (CONS 62 256) ) ;_ end of list ins_lst (LIST (CONS 0 "INSERT") (CONS 2 "TARGET") (CONS 8 "C-VI012CYRF") (CONS 10 (TRANS ins_pt 1 0)) (CONS 41 dimsc) (CONS 42 dimsc) (CONS 62 256) ) ;_ end of list ) ;_ end of SETQ (ENTMAKE ins_lst) (ENTMAKE txt_lst) (ENTMAKE lin_lst) ) ;_ end of while (SETVAR "ucsfollow" old_ucsfollow) (princ) ) ;_ end of defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ***Don't add text below the comment!***|;