;;;Place leader and single or multiple line text notes. ~ reissues last note text for that line. ;;; ;;; This program will place a leader with a vertical line for multiline ;;; notes in the drawing. the leader may be single or multiple lines ;;; at any angle. A vertical line will be placed at the end of the last ;;; leader line if you input points for its Y values. After the vertical ;;; line is placed the notes and line are repositioned so that the vertical ;;; line is centered on the end of the last leader line. ;;; ;;; AUTHOR: HENRY C. FRANCIS ;;; 425 N. ASHE ST. ;;; SOUTHERN PINES, NC 28387 ;;; ;;; All rights reserved without prejudice. ;;; Copyright: 4-14-94 ;;; Edited: 3-10-99 ;;; ;;; Requires Lisp files: uutils, getstyle, dimscl, gvpno, mklayr, txtsize ;;; Requires DWG file: Ldraro ;;; (DEFUN C:MLT (/ pt1 mp2 numb mpb mpn bldsc clayr txht ntxt nxtx nxxt) (SETVAR "cmdecho" 0) (IF (EQ (GETVAR "tilemode") 0) (SETVAR "dimscale" 0) ) ;_ end of if (IF (AND ureal uint ustr ukword uangle udist) NIL (LOAD "uutils") ) ;_ end of IF (IF c:mklayr nil (LOAD "mklayr") ) ;_ end of if (c:svlayr) (IF getstyle NIL (LOAD "getstyle") ) ;_ end of IF (IF (TBLSEARCH "ucs" "pre-mlt") (PROGN (COMMAND "ucs" "s" "pre-mlt" (IF (< (GETVAR "EXPERT") 4) "y" ) ;_ end of IF ) ;_ end of COMMAND (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 "-" colra nil colri nil txht (GETVAR "textsize") numb 0 modf (IF do_cmud_issues "REVU" "NOTE" ) ;_ end of IF ) ;_ 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 txtsize nil (LOAD "txtsize") ) ;_ end of if (txtsize nil) (IF do_cmud (PROGN (cmud_colr) (SETQ colr txcolr) ) ;_ end of PROGN (IF do_exist (SETQ colr "7") (SETQ colr "2") ) ;_ end of if ) ;_ end of IF (c:mklayr) (SETQ arohed (ukword 1 "Yes No" "With arrowhead?" (IF arohed arohed "Yes" ) ;_ end of if ) ;_ end of ukword ) ;_ end of SETQ (IF (EQ arohed "Yes") (IF (NOT (TBLSEARCH "BLOCK" "DIMARO")) (PROGN (ENTMAKE '((0 . "BLOCK") (2 . "DIMARO") (70 . 64) (10 0.0 0.0 0.0)) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 0.0 0.0 0.0) (11 -0.947368 0.157895 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.118421 0.0) (11 -0.236842 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.473684 0.0 0.0) (11 -0.947368 0.0789474 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.0394737 0.0) (11 -0.710526 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.710526 0.0 0.0) (11 -0.947368 -0.0394737 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.0789474 0.0) (11 -0.473684 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.236842 0.0 0.0) (11 -0.947368 -0.118421 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.157895 0.0) (11 0.0 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.118421 0.0) (11 -0.947368 -0.0789474 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.0394737 0.0) (11 -0.947368 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.0789474 0.0) (11 -0.947368 0.0394737 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.118421 0.0) (11 -0.947368 0.157895 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -1.0 0.0 0.0) (11 -0.947368 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "ENDBLK"))) ) ;_ end of progn (PROGN (ENTMAKE '((0 . "BLOCK") (2 . "CDMAROW1") (70 . 64) (10 0.0 0.0 0.0)) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 0.0 0.0 0.0) (11 -0.947368 0.157895 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.118421 0.0) (11 -0.236842 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.473684 0.0 0.0) (11 -0.947368 0.0789474 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.0394737 0.0) (11 -0.710526 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.710526 0.0 0.0) (11 -0.947368 -0.0394737 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.0789474 0.0) (11 -0.473684 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.236842 0.0 0.0) (11 -0.947368 -0.118421 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.157895 0.0) (11 0.0 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.118421 0.0) (11 -0.947368 -0.0789474 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 -0.0394737 0.0) (11 -0.947368 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.0789474 0.0) (11 -0.947368 0.0394737 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -0.947368 0.118421 0.0) (11 -0.947368 0.157895 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "LINE") (8 . "0") (62 . 0) (10 -1.0 0.0 0.0) (11 -0.947368 0.0 0.0) (210 0.0 0.0 1.0) ) ) ;_ end of entmake (ENTMAKE '((0 . "ENDBLK"))) ) ;_ end of progn ) ;_ end of if ) ;_ end of IF (WHILE (SETQ pt1 (GETPOINT (STRCAT "\nStart point of " (IF do_exist "Existing" "New" ) ;_ end of IF (IF (AND (EQ colr_over "1") do_tnote) " custom color" "" ) ;_ end of IF " leader" ) ;_ end of STRCAT ) ;_ end of GETPOINT ) ;_ end of SETQ (SETQ ldrpt_lst (LIST pt1)) (SETQ mp1 pt1) (SETQ leader_ss (SSADD)) (WHILE (SETQ mp2 (upoint 0 "Existing New" (STRCAT "Next " (IF do_exist "Existing" "New" ) ;_ end of IF (IF (AND (EQ colr_over "1") do_tnote) " custom color" "" ) ;_ end of IF " leader point or toggle xisting/ew" ) ;_ end of STRCAT nil mp1 ) ;_ end of upoint ) ;_ end of SETQ (IF (OR (EQ mp2 "Existing") (EQ mp2 "New")) (COND ((EQ mp2 "Existing") (SETQ do_exist T) (IF do_cmud (PROGN (cmud_colr) (SETQ colr txcolr) ) ;_ end of PROGN (SETQ colr "7") ) ;_ end of IF (c:mklayr) ) ((EQ mp2 "New") (SETQ do_exist NIL) (IF do_cmud (PROGN (cmud_colr) (SETQ colr txcolr) ) ;_ end of PROGN (SETQ colr "2") ) ;_ end of IF (c:mklayr) ) ) ;_ end of COND (PROGN (IF do_cmud (cmud_colr) ) ;_ end of IF (COND ((AND do_tnote (EQ colr_over "1")) (SETQ colr tnote_ldrc) (c:mklayr) ) ) ;_ end of COND (SETQ topl nil botl nil ) ;_ end of SETQ (COMMAND ".line" mp1 mp2 "") (SETQ leader_ss (SSADD (ENTLAST) leader_ss)) (SETQ ldrpt_lst (APPEND ldrpt_lst (LIST mp2))) (SETQ mpn mp1 mp1 mp2 llan (ANGLE mpn mp1) ;This is the test for vtest0 (- (* PI 2) (GETVAR "VIEWTWIST")) ;lefthand or righthand ) ;_ end of SETQ (IF ;leaders and determines (< (COS (ABS (- llan vtest0))) 0) ;which side the text goes on (SETQ tjst "mr" tang (- PI (GETVAR "VIEWTWIST")) ) ;_ end of SETQ (SETQ tjst "ml" tang (- 0 (GETVAR "VIEWTWIST")) ) ;_ end of SETQ ) ;_ end of IF (SETQ mpsp (POLAR mp1 tang (* (GETVAR "dimexe") dimsc))) (SETQ tan2 (- (* PI 1.5) (GETVAR "VIEWTWIST")) mp3 (POLAR mpsp tang dis3) mp3 (LIST (CAR mp3) (CADR mp3) 0) mp4 (POLAR mp3 tan2 dis2) mp5 (POLAR mp4 tan2 dis2) mp6 (POLAR mp5 tan2 dis2) mp7 (POLAR mp6 tan2 dis2) mp8 (POLAR mp7 tan2 dis2) mp9 (POLAR mp8 tan2 dis2) mp10 (POLAR mp9 tan2 dis2) mp11 (POLAR mp10 tan2 dis2) mp12 (POLAR mp11 tan2 dis2) tang_d (* (/ (- 0 (GETVAR "viewtwist")) PI) 180) ) ;_ end of SETQ (IF (= numb 0) (PROGN (SETQ mpl mp2 numb 1 ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of WHILE (SETQ ang1 (+ (ANGLE pt1 mpl) (* 0.055555 PI)) ang2 (- (ANGLE pt1 mpl) (* 0.055555 PI)) spt2 (POLAR pt1 ang1 dis1) spt3 (POLAR pt1 ang2 dis1) inss1 dimsc ) ;_ end of SETQ (IF mjrg nil (SETQ mjrg "G") ) ;_ end of if (IF prod nil (SETQ prod "DETL") ) ;_ end of if (SETQ assoc10_lst nil) (FOREACH n ldrpt_lst (IF assoc10_lst (SETQ assoc10_lst (APPEND assoc10_lst (LIST (CONS 10 n)))) (SETQ assoc10_lst (LIST (CONS 10 n))) ) ;_ end of if ) ;_ end of foreach (SETQ assoc10_lst (APPEND assoc10_lst (LIST (CONS 10 (POLAR (CDR (NTH (1- (LENGTH assoc10_lst)) assoc10_lst) ) ;_ end of cdr tang (* (GETVAR "dimexe") dimsc) ) ;_ end of polar ) ;_ end of cons ) ;_ end of list ) ;_ end of append ) ;_ end of setq (SETQ ldrent_lst1 (LIST (CONS 0 "LEADER") (CONS 100 "AcDbEntity") (IF (OR (EQ (GETVAR "tilemode") 1) (> (GETVAR "cvport") 1)) (CONS 67 0) (CONS 67 1) ) ;_ end of if (CONS 8 (STRCAT mjrg (IF llt llt "-" ) ;_ end of if prod (IF colra colra (IF (AND colr (/= colr "-")) colr (IF modf "-" "" ) ;_ end of if ) ;_ end of if ) ;_ end of if (IF (AND modf (NOT (WCMATCH modf "* *"))) modf "" ) ;_ end of if ) ;_ end of STRCAT ) ;_ end of cons (CONS 100 "AcDbLeader") (CONS 3 "STANDARD") (IF (EQ arohed "Yes") (CONS 71 1) (CONS 71 0) ) ;_ end of if (CONS 72 0) (CONS 73 0) (IF (EQ tjst "mr") (CONS 74 1) (CONS 74 0) ) ;_ end of if (CONS 75 1) (CONS 40 (* 0.0875 dimsc)) (CONS 41 (* 0.0875 dimsc)) (CONS 76 (LENGTH ldrpt_lst)) ) ;_ end of list ) ;_ end of setq (SETQ ldrent_lst2 (LIST (CONS 77 (IF do_cmud (ATOI txcolr) (ATOI colr) ) ;_ end of IF ) ;_ end of CONS (CONS 210 (LIST 0.0 0.0 1.0)) (IF (EQ tjst "mr") (CONS 211 (LIST (COS (+ tang PI)) (SIN (+ tang PI)) 0.0)) (CONS 211 (LIST (COS tang) (SIN tang) 0.0)) ) ;_ end of if (CONS 212 (LIST 0.0 0.0 0.0)) (CONS 213 (LIST 0.0 0.0 0.0)) ) ;_ end of list ) ;_ end of setq (SETQ ldrent_lst (APPEND ldrent_lst1 assoc10_lst ldrent_lst2)) (COMMAND ".ERASE" leader_ss "") (ENTMAKE ldrent_lst) (IF (NOT (EQ "" (SETQ ntx1 (IF (AND do_tnote typ_t1) typ_t1 (IF do_tnote "" (STRCASE (ustr 0 "\nNote Text ? " (IF typ_t1 typ_t1 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx2 (IF (AND do_tnote typ_t2) typ_t2 (IF do_tnote "" (STRCASE (ustr 0 "\nSecond Text Line ? " (IF typ_t2 typ_t2 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx3 (IF (AND do_tnote typ_t3) typ_t3 (IF do_tnote "" (STRCASE (ustr 0 "\nThird Text Line ? " (IF typ_t3 typ_t3 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx4 (IF (AND do_tnote typ_t4) typ_t4 (IF do_tnote "" (STRCASE (ustr 0 "\nFourth Text Line ? " (IF typ_t4 typ_t4 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx5 (IF (AND do_tnote typ_t5) typ_t5 (IF do_tnote "" (STRCASE (ustr 0 "\nFifth Text Line ? " (IF typ_t5 typ_t5 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx6 (IF (AND do_tnote typ_t6) typ_t6 (IF do_tnote "" (STRCASE (ustr 0 "\nSixth Text Line ? " (IF typ_t6 typ_t6 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx7 (IF (AND do_tnote typ_t7) typ_t7 (IF do_tnote "" (STRCASE (ustr 0 "\nSeventh Text Line ? " (IF typ_t7 typ_t7 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx8 (IF (AND do_tnote typ_t8) typ_t8 (IF do_tnote "" (STRCASE (ustr 0 "\nEighth Text Line ? " (IF typ_t8 typ_t8 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (IF (NOT (EQ "" (SETQ ntx9 (IF (AND do_tnote typ_t9) typ_t9 (IF do_tnote "" (STRCASE (ustr 0 "\nNinth Text Line ? " (IF typ_t9 typ_t9 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of EQ ) ;_ end of NOT (SETQ ntx10 (IF (AND do_tnote typ_t10) typ_t10 (IF do_tnote "" (STRCASE (ustr 0 "\nTenth Text Line ? " (IF typ_t10 typ_t10 "" ) ;_ end of if "T" ) ;_ end of ustr ) ;_ end of strcase ) ;_ end of IF ) ;_ end of IF ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF (IF (AND do_exist (NOT do_cmud)) (SETQ colr "7") (SETQ colr txcolr) ) ;_ end of IF (COND ((AND do_tnote (EQ colr_over "1")) (SETQ colr tnote_txtc) ) ) ;_ end of COND ;;; (IF do_cmud ;;; nil (c:mklayr) ;;; ) ;_ end of IF (COND (ntx1 (COMMAND ".text" "j" tjst mp3 dis1 tang_d (IF (AND (EQ ntx1 "~") prev_ntx1) prev_ntx1 (IF (EQ ntx1 "~") "" ntx1 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST) ss (SSADD) etins (CDR (ASSOC 10 (ENTGET (ENTLAST)))) topl (POLAR (POLAR (CDR (ASSOC 10 (ENTGET ent1))) (- (* PI 0.5) (GETVAR "VIEWTWIST")) dis1 ) ;_ end of POLAR (+ TANG PI) DIS3 ) ;_ end of POLAR ) ;_ end of SETQ (SSADD ent1 ss) (COND (ntx2 (COMMAND ".text" "j" tjst mp4 dis1 tang_d (IF (AND (EQ ntx2 "~") prev_ntx2) prev_ntx2 (IF (EQ ntx2 "~") "" ntx2 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST))))) (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))))) ) ;_ end of IF (SSADD ent1 ss) (COND (ntx3 (COMMAND ".text" "j" tjst mp5 dis1 tang_d (IF (AND (EQ ntx3 "~") prev_ntx3) prev_ntx3 (IF (EQ ntx3 "~") "" ntx3 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST))))) (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))))) ) ;_ end of IF (SSADD ent1 ss) (COND (ntx4 (COMMAND ".text" "j" tjst mp6 dis1 tang_d (IF (AND (EQ ntx4 "~") prev_ntx4) prev_ntx4 (IF (EQ ntx4 "~") "" ntx4 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST))))) (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))))) ) ;_ end of IF (SSADD ent1 ss) (COND (ntx5 (COMMAND ".text" "j" tjst mp7 dis1 tang_d (IF (AND (EQ ntx5 "~") prev_ntx5) prev_ntx5 (IF (EQ ntx5 "~") "" ntx5 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST)))) ) ;_ end of DISTANCE (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))))) ) ;_ end of IF (SSADD ent1 ss) (COND (ntx6 (COMMAND ".text" "j" tjst mp8 dis1 tang_d (IF (AND (EQ ntx6 "~") prev_ntx6) prev_ntx6 (IF (EQ ntx6 "~") "" ntx6 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST)))) ) ;_ end of DISTANCE (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))))) ) ;_ end of IF (SSADD ent1 ss) (COND (ntx7 (COMMAND ".text" "j" tjst mp9 dis1 tang_d (IF (AND (EQ ntx7 "~") prev_ntx7) prev_ntx7 (IF (EQ ntx7 "~") "" ntx7 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST)))) ) ;_ end of DISTANCE (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST)))) ) ;_ end of SETQ ) ;_ end of IF (SSADD ent1 ss) (COND (ntx8 (COMMAND ".text" "j" tjst mp10 dis1 tang_d (IF (AND (EQ ntx8 "~") prev_ntx8) prev_ntx8 (IF (EQ ntx8 "~") "" ntx8 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST)))) ) ;_ end of DISTANCE (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))) ) ;_ end of CDR ) ;_ end of SETQ ) ;_ end of IF (SSADD ent1 ss) (COND (ntx9 (COMMAND ".text" "j" tjst mp11 dis1 tang_d (IF (AND (EQ ntx9 "~") prev_ntx9) prev_ntx9 (IF (EQ ntx9 "~") "" ntx9 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST)))) ) ;_ end of DISTANCE (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST))) ) ;_ end of CDR ) ;_ end of SETQ ) ;_ end of IF (SSADD ent1 ss) (COND (ntx10 (COMMAND ".text" "j" tjst mp12 dis1 tang_d (IF (AND (EQ ntx10 "~") prev_ntx10) prev_ntx10 (IF (EQ ntx10 "~") "" ntx10 ) ;_ end of IF ) ;_ end of if ) ;_ end of COMMAND (SETQ ent1 (ENTLAST)) (IF (> (DISTANCE mp1 (CDR (ASSOC 10 (ENTGET (ENTLAST))) ) ;_ end of CDR ) ;_ end of DISTANCE (DISTANCE mp1 etins) ) ;_ end of > (SETQ etins (CDR (ASSOC 10 (ENTGET (ENTLAST)) ) ;_ end of ASSOC ) ;_ end of CDR ) ;_ end of SETQ ) ;_ end of IF (SSADD ent1 ss) ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND ) ) ;_ end of COND (SETQ colr (IF (AND do_exist (NOT do_cmud)) "7" lncolr ) ;_ end of IF ) ;_ end of SETQ (c:mklayr) (COMMAND) (IF (EQ ntx2 "") nil (PROGN (SETQ botl (POLAR topl (- (* PI 1.5) (GETVAR "VIEWTWIST")) (- (* dis2 (SSLENGTH ss)) (* dis1 0.625)) ) ;_ end of POLAR ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF (SETQ tj71 2 tj72 2 tj73 0 tj10 etins tj11 (LIST 0.0 0.0 (* dimsc 1002)) cntr 0 tsln (SSLENGTH ss) ) ;_ end of SETQ (IF (EQ (CADDR (GETVAR "VIEWDIR")) -1) (SETQ tj71 2 tj72 2 ) ;_ end of SETQ (SETQ tj71 0 tj72 0 ) ;_ end of SETQ ) ;_ end of IF (WHILE (IF (AND (< cntr tsln) ss) (SETQ tent (ENTGET (SSNAME ss cntr))) ) ;_ end of IF (PROGN (SETQ edtw (ENTGET (CDAR tent))) (IF (EQ (CDR (ASSOC 0 edtw)) "TEXT") (PROGN (SETQ ent71 (CDR (ASSOC 71 edtw)) ent72 (CDR (ASSOC 72 edtw)) ent73 (CDR (ASSOC 73 edtw)) ent10 (CDR (ASSOC 10 edtw)) ent1z (* dimsc 1002) ) ;_ end of SETQ (IF (AND do_exist (NOT do_cmud)) (SETQ edtw (SUBST (CONS 51 0.26179939) (ASSOC 51 edtw) edtw) ) ;_ end of SETQ ) ;_ end of IF (SETQ edtw (SUBST (CONS 71 tj71) (ASSOC 71 edtw) edtw)) (SETQ edtw (SUBST (CONS 72 tj72) (ASSOC 72 edtw) edtw)) (SETQ edtw (SUBST (CONS 73 tj73) (ASSOC 73 edtw) edtw)) (IF (EQ (CADDR (GETVAR "VIEWDIR")) -1) (SETQ edtw (SUBST (CONS 11 ent10) (ASSOC 11 edtw) edtw)) (SETQ edtw (SUBST (CONS 11 (LIST 0.0 0.0 ent1z)) (ASSOC 11 edtw) edtw ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of IF (SETQ tj10x (INTERS (LIST (CAR ent10) (CADR ent10)) (POLAR ent10 (+ tang PI) 10) etins (POLAR etins (+ tang (/ PI 2)) 10) nil ) ;_ end of INTERS edtw (SUBST (CONS 10 tj10x) (ASSOC 10 edtw) edtw) ) ;_ end of SETQ (ENTMOD edtw) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN (SETQ cntr (1+ cntr)) ) ;_ end of WHILE (SETQ numb 0) (SETQ prev_ntx1 (IF (AND (EQ ntx1 "~") prev_ntx1) prev_ntx1 ntx1 ) ;_ end of IF ntx1 nil prev_ntx2 (IF (AND (EQ ntx2 "~") prev_ntx2) prev_ntx2 ntx2 ) ;_ end of IF ntx2 nil prev_ntx3 (IF (AND (EQ ntx3 "~") prev_ntx3) prev_ntx3 ntx3 ) ;_ end of IF ntx3 nil prev_ntx4 (IF (AND (EQ ntx4 "~") prev_ntx4) prev_ntx4 ntx4 ) ;_ end of IF ntx4 nil prev_ntx5 (IF (AND (EQ ntx5 "~") prev_ntx5) prev_ntx5 ntx5 ) ;_ end of IF ntx5 nil prev_ntx6 (IF (AND (EQ ntx6 "~") prev_ntx6) prev_ntx6 ntx6 ) ;_ end of IF ntx6 nil prev_ntx7 (IF (AND (EQ ntx7 "~") prev_ntx7) prev_ntx7 ntx7 ) ;_ end of IF ntx7 nil prev_ntx8 (IF (AND (EQ ntx8 "~") prev_ntx8) prev_ntx8 ntx8 ) ;_ end of IF ntx8 nil prev_ntx9 (IF (AND (EQ ntx9 "~") prev_ntx9) prev_ntx9 ntx9 ) ;_ end of IF ntx9 nil prev_ntx10 (IF (AND (EQ ntx10 "~") prev_ntx10) prev_ntx10 ntx10 ) ;_ end of IF ntx10 nil ) ;_ end of SETQ (IF (EQ tjst "mr") (COMMAND ".move" ss "" (GETVAR "LASTPOINT") (POLAR (GETVAR "LASTPOINT") (+ (- 0 (GETVAR "VIEWTWIST")) (/ PI 2)) (* dis2 (1- (SSLENGTH ss))) ) ;_ end of POLAR ) ;_ end of COMMAND ) ;_ end of IF (IF (EQ add_bubble "1") (PROGN (SETQ old_attreq (GETVAR "attreq")) (SETQ old_attdia (GETVAR "attdia")) (SETVAR "attreq" 1) (SETVAR "attdia" 0) (SETQ bub_point (upoint 1 "" "Bubble insertion point" nil nil)) (COMMAND ".insert" "b1" (LIST (CAR bub_point) (CADR bub_point) (* 1001 dimsc)) dimsc dimsc (* (/ (- (* 2 PI) (GETVAR "viewtwist")) (* 2 PI)) 360) detail_desg sheet_locn ) ;_ end of command (SETVAR "attreq" old_attreq) (SETVAR "attdia" old_attdia) (SETQ add_bubble nil) ) ;_ end of progn ) ;_ end of if ) ;_ end of WHILE (SETVAR "textsize" txht) (c:rslayr) (getstyle "") (SETVAR "osmode" osmod) (COMMAND ".ucs" "r" "pre-mlt") (PRINC) ) ;_ end of DEFUN (DEFUN cmud_colr () (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 "7" lncolr "7" ) ;_ 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) ) ;_ 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!***|;