;;; ;;; ;;; ;;; ;;; Extracted from multiple routines and made into this subroutine ;;; 8-18-99 ;;; ;;; Loads USTR.LSP, DIMSCL.LSP and MKLAYR.LSP ;;; ;;; ;;; Style is forced to STANDARD on line 124. Comment out this line ;;; to ;;; use any ;;; style. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 1990-2005 ;;;> EDITED: 10-06-2005 ;;; (DEFUN txtsize (preset_size /) ;;; (SETQ OLD_EXPERT (GETVAR "EXPERT")) ;;; (SETVAR "EXPERT" 5) (IF (AND thts (EQ (TYPE thts) 'STR) (OR (EQ (TYPE (READ thts)) 'REAL) (EQ (TYPE (READ thts)) 'INT) ) ;_ end of OR ) ;_ end of AND NIL (SETQ thts "110") ) ;_ end of IF (IF preset_size (SETQ thts preset_size) (PROGN (IF ustr NIL (load "ustr" "\nFile USTR.LSP not found! ") ) ;_ end of IF (SETQ thts (ustr 1 "\n\"Leroy Template Size\" or Standard(=110) " (IF (AND thts (EQ (TYPE thts) 'STR)) thts "Standard" ) ;_ end of IF nil ) ;_ end of ustr ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF ;;; Text and leader colors dependent on text height and client ;;; standards ;;; (CMUD, CHAR, etc.) (set_txt_colr thts) (IF dimscl NIL (load "dimscl" "\nFile DIMSCL.LSP not found! ") ) ;_ end of IF (dimscl) (IF (OR (EQ (SUBSTR (STRCASE thts) 1 1) "S") (EQ (TYPE (READ thts)) 'SYM) ) ;_ end of OR (SETQ txtht (* 0.11 dimsc)) (SETQ txtht (* (* (ATOI thts) 0.001) dimsc)) ) ;_ end of IF (SETVAR "TEXTSIZE" txtht) (IF do_cmud (COND ((>= (ATOF thts) 140) (IF (NOT (SETQ romdw_sets (TBLOBJNAME "STYLE" "ROMAND"))) (COMMAND "-style" "ROMAND" "romand" 0 1.5 15 "N" "N" "N") (PROGN (SETQ romdw (ENTGET romdw_sets)) (IF (AND (EQ (CDR (ASSOC 41 romdw)) 1.5) (EQ (CDR (ASSOC 2 romdw)) "ROMAND") (EQ (CDR (ASSOC 40 romdw)) 0.0) (EQUAL (CDR (ASSOC 50 romdw)) (/ PI 12.0) 0.0001) ) ;_ end of AND NIL (PROGN (SETQ romdw (SUBST (CONS 41 1.5) (ASSOC 41 romdw) romdw)) (SETQ romdw (SUBST (CONS 2 "ROMAND") (ASSOC 2 romdw) romdw) ) ;_ end of SETQ (SETQ romdw (SUBST (CONS 40 0.0) (ASSOC 40 romdw) romdw)) (ENTMOD romdw) ) ;_ end of PROGN ) ;_ end of IF (SETVAR "TEXTSTYLE" "ROMAND") ) ;_ end of PROGN ) ;_ end of IF ) ((>= (ATOF thts) 120) (IF (NOT (SETQ romd_sets (TBLOBJNAME "STYLE" "ROMAND"))) (COMMAND "-style" "ROMAND" "romand" 0 1 15 "N" "N" "N") (PROGN (SETQ romd (ENTGET romd_sets)) (IF (AND (EQ (CDR (ASSOC 41 romd)) 1.0) (EQ (CDR (ASSOC 2 romd)) "ROMAND") (EQ (CDR (ASSOC 40 romd)) 0.0) (EQUAL (CDR (ASSOC 50 romd)) (/ PI 12.0) 0.0001) ) ;_ end of AND NIL (PROGN (SETQ romd (SUBST (CONS 41 1.0) (ASSOC 41 romd) romd)) (SETQ romd (SUBST (CONS 2 "ROMAND") (ASSOC 2 romd) romd)) (SETQ romd (SUBST (CONS 40 0.0) (ASSOC 40 romd) romd)) (ENTMOD romd) ) ;_ end of PROGN ) ;_ end of IF (SETVAR "TEXTSTYLE" "ROMAND") ) ;_ end of PROGN ) ;_ end of IF ) (thts (IF (NOT (SETQ simp_sets (TBLOBJNAME "STYLE" "SIMPLEX"))) (COMMAND "-style" "SIMPLEX" "simplex" 0 1 0 "N" "N" "N") (PROGN (SETQ simp (ENTGET simp_sets)) (IF (AND (EQ (CDR (ASSOC 41 simp)) 1.0) (EQ (CDR (ASSOC 2 simp)) "SIMPLEX") (EQ (CDR (ASSOC 40 simp)) 0.0) (EQ (CDR (ASSOC 50 simp)) 0) ) ;_ end of AND NIL (PROGN (SETQ simp (SUBST (CONS 41 1.0) (ASSOC 41 simp) simp)) (SETQ simp (SUBST (CONS 2 "SIMPLEX") (ASSOC 2 simp) simp) ) ;_ end of SETQ (SETQ simp (SUBST (CONS 40 0.0) (ASSOC 40 simp) simp)) (SETQ simp (SUBST (CONS 50 0) (ASSOC 50 simp) simp)) (ENTMOD simp) ) ;_ end of PROGN ) ;_ end of IF (SETVAR "TEXTSTYLE" "SIMPLEX") ) ;_ end of PROGN ) ;_ end of IF ) ) ;_ end of COND ;;; ;;; THE FOLLOWING CODE CAUSED AN INFINITE LOOP LOCK-UP IN A DIALOG BOX ;;; WHOSE INITIALIZATION MADE A CALL TO TXTSIZE ;;; ;;; (PROGN ;;; (IF (FINDFILE "simplex.shx") ;;; (IF (NOT (SETQ cdms_sets (TBLOBJNAME "STYLE" "SIMPLEX"))) ;;; (COMMAND "-style" "SIMPLEX" "SIMPLEX" 0 1 0 "N" "N" "N") ;;; (PROGN ;;; (SETQ cdms (ENTGET cdms_sets)) ;;; (IF (AND (EQ (CDR (ASSOC 41 cdms)) 1.0) ;;; (EQ (CDR (ASSOC 2 cdms)) "SIMPLEX") ;;; (EQ (CDR (ASSOC 40 cdms)) 0.0) ;;; (EQ (CDR (ASSOC 50 cdms)) 0) ;;; ) ;_ end of AND ;;; NIL ;;; (PROGN ;;; (SETQ cdms (SUBST (CONS 41 1.0) (ASSOC 41 cdms) cdms)) ;;; (SETQ ;;; cdms (SUBST (CONS 2 "SIMPLEX") (ASSOC 2 cdms) cdms) ;;; ) ;_ end of SETQ ;;; (SETQ cdms (SUBST (CONS 40 0.0) (ASSOC 40 cdms) cdms)) ;;; (SETQ cdms (SUBST (CONS 50 0) (ASSOC 50 cdms) cdms)) ;;; (ENTMOD cdms) ;;; ) ;_ end of PROGN ;;; ) ;_ end of IF ;;; (SETVAR "TEXTSTYLE" "SIMPLEX") ;;; ) ;_ end of PROGN ;;; ) ;_ end of IF ;;; (PRINC "\nFont file SIMPLEX.SHX not found! ") ;;; ) ;_ end of IF ;;; ) ;_ end of PROGN ) ;_ end of IF ;;;Set layer name variables. See MKLAYR.LSP and CLG.LSP (if clnmstd nil (load "mklayr" "File MKLAYR.LSP not found! ") ) ;_ end of if (if (clnmstd) (progn (if mjrg nil (setq mjrg (substr clayr 1 1)) ) ;_ end of if (if prod nil (setq prod (substr clayr 3 4)) ) ;_ end of if ) ;progn (progn (if mjrg nil (setq mjrg "G") ) ;_ end of if (if prod nil (setq prod "DINF") ) ;_ end of if ) ;progn ) ;if (if llt nil (setq llt "-") ) ;_ end of if (if colr nil (if (and colra colri) nil (setq colr "1" colri nil colra nil ) ;_ end of setq ) ;_ end of if ) ;_ end of if (if modf nil (setq modf "NOTE") ) ;_ end of if (SETQ dis1 txtht ; dis2 (* dis1 1.55) ;line spacing variables dis3 (* dis1 0.55) ; ) ;_ end of SETQ ;;; (SETQ colr (IF do_exist ;;; "7" ;Standard color for existing ;;; lncolr ;;; ) ;_ end of IF ;;; ) ;_ end of SETQ ;;; (SETVAR "EXPERT" OLD_EXPERT) (princ) ) ;_ end of DEFUN (defun set_txt_colr (thts / ) (COND (do_cmud (cmud_colr)) ((OR (EQ (SUBSTR (STRCASE thts) 1 1) "S") (EQ thts "110") ) ;_ end of OR (IF do_exist (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ (SETQ txcolr "6" lncolr "1" ) ;_ end of SETQ ) ) ((<= (ATOF thts) 80) (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ ) ((<= (ATOF thts) 125) (IF do_exist (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ (SETQ txcolr "6" lncolr "1" ) ;_ end of SETQ ) ) ((< (ATOF thts) 200) (IF do_exist (SETQ txcolr "6" lncolr "6" ) ;_ end of SETQ (SETQ txcolr "2" lncolr "6" ) ;_ end of SETQ ) ) ((>= (ATOF thts) 200) (IF do_exist (SETQ txcolr "6" lncolr "6" ) ;_ end of SETQ (SETQ txcolr "2" lncolr "6" ) ;_ end of SETQ ) ) (thts (IF do_exist (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ (SETQ txcolr "6" lncolr "1" ) ;_ end of SETQ ) ) ) ;_ end of COND (princ) ) ;_ end of defun (DEFUN cmud_colr () (IF (AND do_cmud (EQ thts "Standard")) (SETQ thts "110") ) (IF (WCMATCH (STRCASE (GETVAR "dwgname")) "C??PRX??.DWG") (SETQ do_profile T) (SETQ do_profile nil) ) ;_ end of IF (COND ((<= (ATOF thts) 80) (IF do_profile (IF do_exist (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ ) ;_ end of IF (IF do_exist (SETQ txcolr "9" lncolr "9" ) ;_ end of SETQ (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of IF ) ((AND (OR do_exist do_cmud) (<= (ATOF thts) 100)) (SETQ txcolr "1" lncolr "1" ) ;_ end of SETQ ) (T (SETQ txcolr "2" lncolr "2" ) ;_ end of SETQ ) ) ;_ end of cond (SETQ do_profile nil) (PRINC) ) ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 0 0 0 T T T T) ***Don't add text below the comment!***|;