;;;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. ;;; ;;; ;;; ;;; Requires Lisp files: uutils, getstyle, dimscl, gvpno, mklayr, txtsize ;;; Requires DWG file: Ldraro ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-14-94 ;;;> EDITED: 01-22-2007 ;;; (DEFUN MLT_ERROR (msg /) (SETQ *ERROR* old_MLTERROR) (IF (and old_mlt_layer (TBLSEARCH "LAYER" old_mlt_layer)) (SETVAR "clayer" old_mlt_layer) ) (SETVAR "osmode" old_mlt_osmodes) (SETVAR "ucsfollow" old_mlt_ucsfollow) (PRINC "\nERROR: ") (PRINC msg) (PRINC) ) ;_ end of defun ;;;**************************************************************************** (DEFUN C:MLT (/ pt1 mp2 numb mpb mpn bldsc clayr txht ntxt nxtx nxxt) (SETVAR "cmdecho" 0) (SETQ OLD_MLTERROR *ERROR*) (SETQ *error* mlt_error) (SETQ old_mlt_osmodes (GETVAR "osmode")) (SETQ old_mlt_ucsfollow (GETVAR "ucsfollow")) (SETVAR "ucsfollow" 0) (COMMAND ".undo" "begin") (IF (AND (EQ (GETVAR "tilemode") 0) (EQ (GETVAR "dimscale") 1.0) ) ;_ end of AND (SETVAR "dimscale" 0) ) ;_ end of if (IF debug_mlt (PROGN (PRINC "\nt-leader=") (PRINC t-leader) (PRINC "\n(SSLENGTH ss)=") (PRINC (SSLENGTH ss)) ;;; (COMMAND ".CIRCLE" mp1 (*(+ 0.225 (GETVAR "DIMEXE"))dimsc)) (PRINC) ) ) (IF (AND ureal uint ustr ukword uangle udist) NIL (LOAD "uutils") ) ;_ end of IF (SETQ old_mlt_layer (GETVAR "clayer")) (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 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 (IF (AND do_tnote tn_thts) (SETQ thts tn_thts) ) (IF (AND thts (OR (EQ (TYPE (READ thts)) 'INT) (EQ (TYPE (READ thts)) 'REAL) ) ;_ end of OR ) ;_ end of AND (PROGN (PRINC (STRCAT "\nCurrent text height is \"Leroy " thts "\" = " (RTOS (/ (ATOF thts) 1000.0) 2 4) " X DIMSCALE (or if DIMSCALE=0 viewport scale). " ) ;_ end of STRCAT ) ;_ end of PRINC (txtsize thts) ) ;_ end of PROGN (IF (AND preset_size (OR (EQ (TYPE (READ preset_size)) 'INT) (EQ (TYPE (READ preset_size)) 'REAL) ) ;_ end of OR ) ;_ end of AND (PROGN (PRINC (STRCAT "\nCurrent text height is \"Leroy " preset_size "\" = " (RTOS (/ (ATOF preset_size) 1000.0) 2 4) " X DIMSCALE (or if DIMSCALE=0 viewport scale). " ) ;_ end of STRCAT ) ;_ end of PRINC (txtsize preset_size) ) ;_ end of PROGN (txtsize NIL) ) ;_ end of IF ) ;_ end of IF (IF do_cmud (PROGN (cmud_colr) (SETQ colr txcolr) ) ;_ end of PROGN (IF do_exist (SETQ colr "1") (SETQ colr "2") ) ;_ end of if ) ;_ end of IF (IF (AND arohed (OR (EQ arohed "YES") (EQ arohed "NO"))) NIL (SETQ arohed (STRCASE (ukword 1 "Yes No" "With arrowhead?" "Yes"))) ) ;_ end of IF (PRINC (STRCAT "\nLeaders" (COND ((EQ arohed "YES") " WILL have ") (T " WILL NOT have ") ) ;_ end of COND "arrowheads. To change this option enter LDROPTS at the command line. " ) ;_ end of STRCAT ) ;_ end of PRINC (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 (SETVAR "OSMODE" old_mlt_osmodes) (WHILE (IF (AND sdlbl_pt1 (NOT stop_pt1)) (SETQ pt1 sdlbl_pt1 stop_pt1 T) (IF stop_pt1 NIL (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)) ;;; (SETVAR "osmode" 0) (WHILE ;;; (IF sdlbl_pt2 ;;; (PROGN ;;;;;; (PRINC "\nsdlbl_pt2=") ;;;;;; (princ sdlbl_pt2) ;;;;;; (princ) ;;; (SETQ mp2 sdlbl_pt2 ;;; sdlbl_pt2 NIL ;;; stop_pt2 T ;;; ) ;;; ) ;;; (IF stop_pt2 ;;; NIL (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 "1") ) ;_ 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")) (IF (AND (ASSOC (STRCASE tnote_ldrc) tno_color_list) (EQ (TYPE (READ (CDR (ASSOC (STRCASE tnote_ldrc) tno_color_list)) ) ;_ end of READ ) ;_ end of TYPE 'INT ) ;_ end of EQ ) ;_ end of AND (SETQ colr (CDR (ASSOC (STRCASE tnote_ldrc) tno_color_list)) colri NIL colra NIL ) ;_ end of SETQ (IF (ASSOC (STRCASE tnote_ldrc) tno_color_list) (SETQ colr NIL colri (IF (> (READ (STRCASE tnote_ldrc)) 29) (+ 220 (READ (STRCASE tnote_ldrc))) (READ (STRCASE tnote_ldrc)) ) ;_ end of IF colra (CDR (ASSOC (STRCASE tnote_ldrc) tno_color_list) ) ;_ end of CDR ) ;_ end of SETQ (SETQ colr "2" colri NIL colra NIL ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of IF ;;; (SETQ colr tnote_ldrc) ;;; (c:mklayr) ) ) ;_ end of COND (SETQ topl nil botl nil ) ;_ end of SETQ (SETVAR "OSMODE" 0) (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 ;;; (IF(AND(EQ tjst "ml")(WCMATCH(GETVAR"ACADVER")"15*")(/=(ANGLE(CADR(REVERSE ldrpt_lst))(LAST ldrpt_lst))vtest0)) ;;; (SETQ ldrpt_lst (APPEND ldrpt_lst (LIST (POLAR (LAST ldrpt_lst) vtest0 (* 0.015 dimsc))))) ;;; ) ;;; (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 ;;; (IF (AND (<= (DISTANCE (CDR (LAST assoc10_lst)) ;;; (CDADR (REVERSE assoc10_lst)) ;;; ) ;_ end of DISTANCE ;;; (* dimsc 0.1) ;;; ) ;_ end of <= ;;; ) ;(WCMATCH(GETVAR"ACADVER")"14*") ;;; (SETQ assoc10_lst (REVERSE (CDR (REVERSE assoc10_lst)))) ;;; ) ;_ end of IF ;;; (SETQ assoc10_lst ;;; (APPEND ;;; assoc10_lst ;;; (LIST ;;; ;;; (CONS ;;; ;;; 10 ;;; ;;; (POLAR ;;; ;;; (CDR ;;; ;;; (NTH (1- (LENGTH assoc10_lst)) assoc10_lst) ;;; ;;; ) ;_ end of cdr ;;; ;;; tang ;;; ;;; (* (/(GETVAR "dimexe")2.0) dimsc) ;;; ;;; ) ;_ end of polar ;;; ;;; ) ;_ end of cons ;;; (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 ;;; (IF (AND do_tnote (EQ colr_over "1")) ;;; (SETQ colr tnote_ldrc) ;;; (PROGN ;;; (set_txt_colr thts) ;;; (SETQ colr lncolr) ;;; ) ;_ end of PROGN ;;; ) ;_ end of IF ;;; (c:mklayr) ;;; (IF (TBLSEARCH "DIMSTYLE" "ARCHLEADER") ;;; NIL ;;; (PROGN ;;; (IF c:archldrs ;;; NIL ;;; (LOAD "archldrs") ;;; ) ;_ end of IF ;;; (IF c:archldrs ;;; (C:ARCHLDRS) ;;; ) ;_ end of IF ;;; ) ;_ end of PROGN ;;; ) ;_ end of IF ;;; (IF (TBLSEARCH "DIMSTYLE" "ARCHLEADER") ;;; (SETQ ldrent_lst1 ;;; (LIST ;;; (CONS 0 "LEADER") ;;; (CONS 3 "ARCHLEADER") ;;; (CONS 100 "AcDbEntity") ;;; (IF (OR (EQ (GETVAR "tilemode") 1) (> (GETVAR "cvport") 1)) ;;; (CONS 67 0) ;;; (CONS 67 1) ;;; ) ;_ end of if ;;; (CONS 8 new_ln) ;;; (CONS 100 "AcDbLeader") ;;; (IF (EQ arohed "YES") ;;; (CONS 71 1) ;;; (CONS 71 0) ;;; ) ;_ end of if ;;; (CONS 72 0) ;;; (CONS 73 3) ;;; (CONS 75 0) ;;; (CONS 76 (LENGTH ldrpt_lst)) ;;; ) ;_ end of list ;;; ) ;_ 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 new_ln) ;;; (CONS 100 "AcDbLeader") ;;; (CONS 3 "STANDARD") ;;; (IF (EQ arohed "YES") ;;; (CONS 71 1) ;;; (CONS 71 0) ;;; ) ;_ end of if ;;; (CONS 72 0) ;;; (CONS 73 3) ;;; (CONS 75 0) ;;; (CONS 76 (LENGTH ldrpt_lst)) ;;; ) ;_ end of list ;;; ) ;_ end of setq ;;; ) ;_ end of IF ;;; (SETQ ldrent_lst2 ;;; (LIST ;;; (CONS 77 ;;; ;;; (IF do_cmud ;;; ;;; (ATOI txcolr) ;;; (ATOI lncolr) ;;; ;;; ) ;_ 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) (IF (EQ (TYPE typ_t1) 'STR) typ_t1 (IF (EQ (TYPE typ_t1) 'INT) (ITOA typ_t1) (IF (EQ (TYPE typ_t1) 'REAL) (RTOS typ_t1 2 3) ) ;_ end of IF ) ;_ end of IF ) ;_ end of IF (IF do_tnote "" (STRCASE (ustr 0 "\nNote Text ? " (IF (AND typ_t1 (EQ (TYPE typ_t1) 'STR)) typ_t1 (IF (EQ (TYPE typ_t1) 'INT) (ITOA typ_t1) (IF (EQ (TYPE typ_t1) 'REAL) (RTOS typ_t1 2 3) "" ) ;_ end of IF ) ;_ end of IF ) ;_ 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 (WHILE (AND ntx1 (WCMATCH ntx1 "* ")) (SETQ ntx1 (SUBSTR ntx1 1 (1- (STRLEN ntx1)))) ) (WHILE (AND ntx2 (WCMATCH ntx2 "* ")) (SETQ ntx2 (SUBSTR ntx2 1 (1- (STRLEN ntx2)))) ) (WHILE (AND ntx3 (WCMATCH ntx3 "* ")) (SETQ ntx3 (SUBSTR ntx3 1 (1- (STRLEN ntx3)))) ) (WHILE (AND ntx4 (WCMATCH ntx4 "* ")) (SETQ ntx4 (SUBSTR ntx4 1 (1- (STRLEN ntx4)))) ) (WHILE (AND ntx5 (WCMATCH ntx5 "* ")) (SETQ ntx5 (SUBSTR ntx5 1 (1- (STRLEN ntx5)))) ) (WHILE (AND ntx6 (WCMATCH ntx6 "* ")) (SETQ ntx6 (SUBSTR ntx6 1 (1- (STRLEN ntx6)))) ) (WHILE (AND ntx7 (WCMATCH ntx7 "* ")) (SETQ ntx7 (SUBSTR ntx7 1 (1- (STRLEN ntx7)))) ) (WHILE (AND ntx8 (WCMATCH ntx8 "* ")) (SETQ ntx8 (SUBSTR ntx8 1 (1- (STRLEN ntx8)))) ) (WHILE (AND ntx9 (WCMATCH ntx9 "* ")) (SETQ ntx9 (SUBSTR ntx9 1 (1- (STRLEN ntx9)))) ) (WHILE (AND ntx10 (WCMATCH ntx10 "* ")) (SETQ ntx10 (SUBSTR ntx10 1 (1- (STRLEN ntx10)))) ) (COND ((AND do_tnote (EQ colr_over "1")) (IF (AND (ASSOC (STRCASE tnote_txtc) tno_color_list) (EQ (TYPE (READ (CDR (ASSOC (STRCASE tnote_txtc) tno_color_list))) ) ;_ end of TYPE 'INT ) ;_ end of EQ ) ;_ end of AND (SETQ colr (CDR (ASSOC (STRCASE tnote_txtc) tno_color_list)) colri NIL colra NIL ) ;_ end of SETQ (IF (ASSOC (STRCASE tnote_txtc) tno_color_list) (SETQ colr NIL colri (IF (> (READ (STRCASE tnote_txtc)) 29) (+ 220 (READ (STRCASE tnote_txtc))) (READ (STRCASE tnote_txtc)) ) ;_ end of IF colra (CDR (ASSOC (STRCASE tnote_txtc) tno_color_list)) ) ;_ end of SETQ (SETQ colr "3" colri NIL colra NIL ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of IF ;;; (SETQ colr tnote_txtc) ) (T (set_txt_colr thts) (SETQ colr txcolr)) ) ;_ 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)) "1" 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 (SETQ ss_cnt 0) (SETQ max_strlen nil max_oboffset 0 ) (WHILE (< ss_cnt (SSLENGTH ss)) (IF debug_remlt (PROGN (PRINC "\nText=") (PRINC (CDR (ASSOC 1 (ENTGET (SSNAME ss ss_cnt))))) (PRINC (STRCAT "\nmax_strlen (" (ITOA ss_cnt) ")=")) (PRINC max_strlen) (PRINC "\n(+(CAAR(TEXTBOX (ENTGET (SSNAME ss ss_cnt))))(CAADR (TEXTBOX (ENTGET (SSNAME ss ss_cnt)))))=") (PRINC (+(CAAR(TEXTBOX (ENTGET (SSNAME ss ss_cnt))))(CAADR (TEXTBOX (ENTGET (SSNAME ss ss_cnt)))))) (PRINC) ) ;_ end of PROGN ) ;_ end of IF (SETQ text_edef (ENTGET (SSNAME ss ss_cnt))) (SETQ max_strlen (IF (AND max_strlen (EQ (TYPE max_strlen) 'REAL)) (MAX max_strlen (+(CAAR(TEXTBOX text_edef))(CAADR (TEXTBOX text_edef))max_oboffset) ) ;_ end of MAX (+(CAAR(TEXTBOX text_edef))(CAADR (TEXTBOX text_edef))max_oboffset) ) ;_ end of IF max_oboffset (IF (AND max_oboffset (EQ (TYPE max_oboffset) 'REAL)) (MAX max_oboffset (CAAR(TEXTBOX text_edef)) ) ;_ end of MAX (CAAR(TEXTBOX text_edef)) ) ;_ end of IF ) ;_ end of SETQ (SETQ ss_cnt (1+ ss_cnt)) ) ;_ end of WHILE (SETQ last_len (+(CAAR(TEXTBOX (ENTGET (SSNAME ss (1- (SSLENGTH ss))))))(CAADR (TEXTBOX (ENTGET (SSNAME ss (1- (SSLENGTH ss))))))(CAAR(TEXTBOX(ENTGET (SSNAME ss (1- (SSLENGTH ss))))))) ) ;_ end of SETQ (SETQ TEXTHEIGHT dis1) (IF (EQ tjst "mr") (PROGN (SETQ INT_OBJSNAP (GETVAR "OSMODE")) (SETVAR "OSMODE" 0) (COMMAND ".move" ss "" (GETVAR "LASTPOINT") (IF (AND (EQ t-leader "1")(>(SSLENGTH ss)1)) (POLAR (POLAR (GETVAR "LASTPOINT") (+ (- 0 (GETVAR "VIEWTWIST")) (/ PI 2)) (* dis2 (- (/ (SSLENGTH ss) 2.0) 0.5)) ) ;_ end of POLAR (- 0 (GETVAR "VIEWTWIST") PI) ;;; (+ (* 2.25 TEXTHEIGHT) (*(GETVAR "DIMEXE")dimsc)) (+ max_oboffset (* 2.25 TEXTHEIGHT)) ) ;_ end of POLAR (POLAR (GETVAR "LASTPOINT") (+ (- 0 (GETVAR "VIEWTWIST")) (/ PI 2)) (+ max_oboffset (* dis2 (1- (SSLENGTH ss)))) ) ;_ end of POLAR ) ;_ end of IF ) ;_ end of COMMAND (SETVAR "OSMODE" INT_OBJSNAP) (IF (AND (EQ t-leader "1")(>(SSLENGTH ss)1)) (SETQ last_ldrpt (POLAR (LAST ldrpt_lst) (+ (- 0 (GETVAR "VIEWTWIST")) PI) (+ (* 2.25 TEXTHEIGHT)(*(GETVAR "DIMEXE")dimsc)) ) ;_ end of POLAR ) ;_ end of SETQ (IF (> max_strlen last_len) (SETQ last_ldrpt (POLAR (LAST ldrpt_lst) (+ (- 0 (GETVAR "VIEWTWIST")) PI) (- max_strlen last_len) ) ;_ end of POLAR ) ;_ end of SETQ (SETQ last_ldrpt NIL) ) ;_ end of IF ) ;_ end of IF (IF last_ldrpt (SETQ ldrpt_lst (APPEND ldrpt_lst (LIST last_ldrpt))) ) ;_ end of IF ) ;_ end of progn (IF (AND (EQ t-leader "1")(>(SSLENGTH ss)1)) (PROGN (SETQ INT_OBJSNAP (GETVAR "OSMODE")) (SETVAR "OSMODE" 0) (COMMAND ".move" ss "" (GETVAR "LASTPOINT") (POLAR (POLAR (GETVAR "LASTPOINT") (+ (- 0 (GETVAR "VIEWTWIST")) (/ PI 2)) (* dis2 (- (/ (SSLENGTH ss) 2.0) 0.5)) ) ;_ end of POLAR (- 0 (GETVAR "VIEWTWIST")) (* dimsc 0.275) ) ;_ end of POLAR ) ;_ end of COMMAND (SETVAR "OSMODE" INT_OBJSNAP) (SETQ last_ldrpt (POLAR (LAST ldrpt_lst) (- 0 (GETVAR "VIEWTWIST")) (+ (* 2.25 TEXTHEIGHT) (*(GETVAR "DIMEXE")dimsc)) ) ;_ end of POLAR ) ;_ end of SETQ (SETQ ldrpt_lst (APPEND ldrpt_lst (LIST last_ldrpt))) ) ;_ end of progn ) ;_ end of IF ) ;_ 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 (IF (AND (<= (DISTANCE (CDR (LAST assoc10_lst)) (CDADR (REVERSE assoc10_lst)) ) ;_ end of DISTANCE (* dimsc 0.125) ) ;_ end of <= ) ;(WCMATCH(GETVAR"ACADVER")"14*") (SETQ assoc10_lst (REVERSE (CDR (REVERSE assoc10_lst)))) ) ;_ end of IF (IF (AND (EQ t-leader "1")(>(SSLENGTH ss)1)) NIL (SETQ assoc10_lst (APPEND assoc10_lst (LIST ;;; (CONS ;;; 10 ;;; (POLAR ;;; (CDR ;;; (NTH (1- (LENGTH assoc10_lst)) assoc10_lst) ;;; ) ;_ end of cdr ;;; tang ;;; (* (/(GETVAR "dimexe")2.0) dimsc) ;;; ) ;_ end of polar ;;; ) ;_ end of cons (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 ) ;_ end of IF (IF (AND do_tnote (EQ colr_over "1")) (IF (AND (ASSOC (STRCASE tnote_ldrc) tno_color_list) (EQ (TYPE (READ (CDR (ASSOC (STRCASE tnote_ldrc) tno_color_list))) ) ;_ end of TYPE 'INT ) ;_ end of EQ ) ;_ end of AND (SETQ colr (CDR (ASSOC (STRCASE tnote_ldrc) tno_color_list)) colri NIL colra NIL lncolr colr ) ;_ end of SETQ (IF (ASSOC (STRCASE tnote_ldrc) tno_color_list) (SETQ colr NIL colri (IF (> (READ (STRCASE tnote_ldrc)) 29) (+ 220 (READ (STRCASE tnote_ldrc))) (READ (STRCASE tnote_ldrc)) ) ;_ end of IF colra (CDR (ASSOC (STRCASE tnote_ldrc) tno_color_list)) lncolr (ITOA colri) ) ;_ end of SETQ (SETQ colr "2" colri NIL colra NIL lncolr colr ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of IF ;;; (SETQ colr tnote_ldrc) (PROGN (set_txt_colr thts) (SETQ colr lncolr) ) ;_ end of PROGN ) ;_ end of IF (c:mklayr) (IF debug_mlt (PROGN (PRINC "\nEntering pgld_makeleader... ") (PRINC) ) ) (pgld_makeleader) (IF debug_mlt (PROGN (PRINC "\nExiting pgld_makeleader... ") (PRINC) ) ) (IF (EQ add_bubble "1") (PROGN (SETQ old_mlt_attreq (GETVAR "attreq")) (SETQ old_mlt_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_mlt_attreq) (SETVAR "attdia" old_mlt_attdia) ) ;_ end of progn ) ;_ end of if (SETVAR "OSMODE" old_mlt_osmodes) ) ;_ end of WHILE (SETQ add_bubble nil) (SETVAR "textsize" txht) (SETQ preset_size NIL) (c:rslayr) (getstyle "") (SETVAR "osmode" old_mlt_osmodes) (COMMAND ".ucs" "r" "pre-mlt") (COMMAND ".undo" "end") (SETVAR "ucsfollow" old_mlt_ucsfollow) (SETQ *ERROR* OLD_MLTERROR) (PRINC) ) ;_ end of DEFUN (DEFUN c:ldropts () (SETQ arohed (STRCASE (ukword 1 "Yes No" "Place leaders with arrowheads?" (IF arohed arohed "Yes" ) ;_ end of IF ) ;_ end of ukword ) ;_ end of STRCASE ) ;_ end of SETQ (PRINC) ) ;_ end of DEFUN (defun pgld_makeleader ();(new_ln arohed ldrpt_lst txcolr lncolr tang / ) (IF dis1 (COND ((>= dis1 0.09) (SETQ dimstylename "ARCHLEADER") (IF (TBLSEARCH "DIMSTYLE" dimstylename) NIL (PROGN (IF c:archldrs NIL (LOAD "archldrs") ) ;_ end of IF (IF c:archldrs (C:ARCHLDRS) ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF ) ((< dis1 0.09) (SETQ dimstylename "HARCHLEADER") (IF (TBLSEARCH "DIMSTYLE" dimstylename) NIL (PROGN (IF c:harchldrs NIL (LOAD "harchldrs") ) ;_ end of IF (IF c:harchldrs (C:HARCHLDRS) ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF ) ) ;_ end of COND (SETQ dimstylename NIL) ) ;_ end of IF (IF (TBLSEARCH "DIMSTYLE" dimstylename) (SETQ ldrent_lst1 (LIST (CONS 0 "LEADER") (CONS 3 dimstylename) (CONS 100 "AcDbEntity") (IF (OR (EQ (GETVAR "tilemode") 1) (> (GETVAR "cvport") 1)) (CONS 67 0) (CONS 67 1) ) ;_ end of if (CONS 8 new_ln) (CONS 100 "AcDbLeader") (IF (EQ arohed "YES") (CONS 71 1) (CONS 71 0) ) ;_ end of if (CONS 72 0) (CONS 73 3) (CONS 75 0) (CONS 76 (LENGTH ldrpt_lst)) ) ;_ end of list ) ;_ 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 new_ln) (CONS 100 "AcDbLeader") (CONS 3 "STANDARD") (IF (EQ arohed "YES") (CONS 71 1) (CONS 71 0) ) ;_ end of if (CONS 72 0) (CONS 73 3) (CONS 75 0) (CONS 76 (LENGTH ldrpt_lst)) ) ;_ end of list ) ;_ end of setq ) ;_ end of IF (SETQ ldrent_lst2 (LIST (CONS 77 (IF do_cmud (ATOI txcolr) (ATOI lncolr) ) ;_ 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 debug_mlt (PROGN (PRINC "\nWe should have amde a T-leader! ") (princ) ) ) (IF (AND (EQ t-leader "1")(>(SSLENGTH ss)1)) (ENTMAKE (LIST (CONS 0 "LINE") (CONS 8 new_ln) (CONS 10 (POLAR last_ldrpt (+ (- 0 (GETVAR "VIEWTWIST")) (* PI 0.5)) (- (* dis2 (/ (SSLENGTH ss) 2.0)) (/ dis3 2.0)) ) ;_ end of POLAR ) ;_ end of CONS (CONS 11 (POLAR last_ldrpt (+ (- 0 (GETVAR "VIEWTWIST")) (* PI 1.5)) (- (* dis2 (/ (SSLENGTH ss) 2.0)) (/ dis3 2.0)) ) ;_ end of POLAR ) ;_ end of CONS ) ;_ end of LIST ) ;_ end of ENTMAKE ) ;_ end of IF (IF (>= (READ (SUBSTR (GETVAR "ACADVER")1 4)) 15.0) (PROGN (COMMAND ".dim" "upd" "l" "") (COMMAND) ) ;_ end of PROGN ) ;_ end of IF ) ;|«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!***|;