;;;Dialog utility for storing, editing and retrieving/placing Typical Notes into a drawing. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 2/1995 ;;;> EDITED: 11-17-2005 ;;; (defun ids_ERROR (msg / ) (done_dialog) (TERM_DIALOG) (IF old_idsrror (SETQ *ERROR* old_idsrror) ) (PRINC "\nERROR: ") (PRINC msg) (IF getstyle (getstyle "")) (PRINC) ) (DEFUN ids_edit (/ pl_note new_ids_list) (SETQ old_idsrror *ERROR*) (IF getstyle NIL (LOAD "getstyle" "\nFile GETSTYLE.LSP not loaded! ")) (IF getstyle (getstyle "A")) (setq mystartcdate (getvar"cdate")) (SETQ quit_clg nil) (SETQ count 0) (IF browser_help NIL (LOAD "browser_help" "\nFile BROWSER_HELP not loaded!")) (SETQ num (LOAD_DIALOG "gpdgn 20051117")) (NEW_DIALOG "ids_edit" num) (SETQ thts (IF thts thts (IF do_cmud "100" "125")) ) (SET_TILE "leroy_size" thts) (set_leroy thts) (SET_TILE "ids_space" (COND ((AND (EQ (GETVAR "tilemode") 0) ids_space (OR (EQ ids_space "ids_psp") (EQ ids_space "ids_csp"))) ids_space ) ((AND (EQ (GETVAR "tilemode") 1) ids_space (OR (EQ ids_space "ids_msp") (EQ ids_space "ids_csp"))) ids_space ) (T (SETQ ids_space "ids_msp")) ) ) ;_ end of SET_TILE (SET_TILE "colr_over" (IF colr_over colr_over "0" ) ) (SET_TILE "ldrc_value" (IF ids_ldrc ids_ldrc "2" ) ) (SET_TILE "txtc_value" (IF ids_txtc ids_txtc "3" ) ) (SET_TILE "ldr_slide" (IF ids_ldrc ids_ldrc "2" ) ) (SET_TILE "txt_slide" (IF ids_txtc ids_txtc "3" ) ) (set_colr_mode) (SET_TILE "add_bubble" (IF add_bubble add_bubble "0" ) ;_ end of if ) ;_ end of set_tile (SET_TILE "detail_desg" (IF detail_desg detail_desg "" ) ;_ end of if ) ;_ end of set_tile (SET_TILE "sheet_locn" (IF sheet_locn sheet_locn "" ) ;_ end of if ) ;_ end of set_tile (IF (OR (NOT add_bubble) (EQ add_bubble "0")) (PROGN (MODE_TILE "detail_desg" 1) (MODE_TILE "sheet_locn" 1) ) ;_ end of progn (PROGN (MODE_TILE "detail_desg" 0) (MODE_TILE "sheet_locn" 0) ) ;_ end of progn ) ;_ end of if (ACTION_TILE "Browse_datf" "(get_dat_file)") (ACTION_TILE "Major" "(setq sel_key(get_tile\"Major\"))(set_ids_ebox)(setq newitem(get_tile\"new_item\"))(set_wrap)(set_pview)(if(eq $reason 4)(progn(set_bubl)(setq pl_note T preset_size(get_tile\"leroy_size\"))(done_dialog)))" ) ;_ end of action_tile (ACTION_TILE "Search" "(setq srch_str (strcat \"*\"(get_tile \"new_item\")\"*\"))(srch_tnlist)") (ACTION_TILE "ids_space" "(setq ids_space (get_tile\"ids_space\"))") (ACTION_TILE "force_caps" "(setq force_caps (get_tile \"force_caps\"))(set_caps)" ) ;_ end of action_tile (ACTION_TILE "new_item" "(setq newitem (get_tile \"new_item\"))(set_caps)(set_pview)" ) ;_ end of action_tile (ACTION_TILE "Wrap_slide" "(setq wrap_len(get_tile\"Wrap_slide\"))(set_tile\"Wrap_value\"wrap_len)(setq newitem(get_tile\"new_item\"))(set_bubl)(set_pview)" ) ;_ end of action_tile (ACTION_TILE "Wrap_value" "(setq wrap_len(get_tile\"Wrap_value\"))(set_tile\"Wrap_slide\"wrap_len)(setq newitem(get_tile\"new_item\"))(set_bubl)(set_pview)" ) ;_ end of action_tile (ACTION_TILE "colr_over" "(setq colr_over (get_tile \"colr_over\"))(set_colr_mode)") (ACTION_TILE "ldrc_value" "(setv_ldrc)") (ACTION_TILE "txtc_value" "(setv_txtc)") (ACTION_TILE "ldr_slide" "(sets_ldrc)") (ACTION_TILE "txt_slide" "(sets_txtc)") (ACTION_TILE "decimal_size" "(set_decimal (get_tile\"decimal_size\"))") (ACTION_TILE "leroy_size" "(set_leroy (get_tile\"leroy_size\"))") (ACTION_TILE "add_bubble" "(set_bubl)") (ACTION_TILE "detail_desg" "(set_bubl)") (ACTION_TILE "sheet_locn" "(set_bubl)") (ACTION_TILE "Save_changes" "(set_bubl)(setq new_ids_list T)(upd_ids_dat)" ) ;_ end of ACTION_TILE (ACTION_TILE "Add_more" "(setq newitem (get_tile \"new_item\"))(add_ids_item)(mode_tile \"new_item\" 2)" ) ;_ end of action_tile (ACTION_TILE "Repl_line" "(setq repl_key (get_tile \"Major\"))(repl_item)" ) ;_ end of action_tile (ACTION_TILE "Delete_line" "(setq del_key (get_tile \"Major\"))(del_lines)(set_tile\"new_item\" \"\")" ) ;_ end of action_tile (ACTION_TILE "Place_note" "(setq newitem (get_tile \"new_item\"))(set_bubl)(setq pl_note T preset_size (get_tile\"leroy_size\"))(done_dialog 1)" ) ;_ end of action_tile (ACTION_TILE "Add_cancel" "(setq preset_size nil)(done_dialog 0)") (ACTION_TILE "help_ids" "(browser_help \"ids\")") (f_ids) (IF wrap_len (PROGN (SET_TILE "Wrap_value" wrap_len) (SET_TILE "Wrap_slide" wrap_len) ) ;_ end of progn (PROGN (SET_TILE "Wrap_value" "65") (SET_TILE "Wrap_slide" "65") ) ;_ end of progn ) ;_ end of if (MODE_TILE "new_item" 2) (START_DIALOG) (UNLOAD_DIALOG num) (IF pl_note (place_note) (PRINC) ) ;_ end of if (IF old_idsrror (SETQ *ERROR* old_idsrror) ) (IF getstyle (getstyle "")) (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN f_ids (/) (set_ids_list) (chk_tnlst) (START_LIST "Major" 3) (MAPCAR 'ADD_LIST ids_list) (END_LIST) (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN srch_tnlist (/) (SETQ srch_result NIL) (set_tile "error" "") (foreach n ids_list (if (wcmatch (STRCASE n) (STRCASE srch_str)) (SETQ srch_result (APPEND srch_result (LIST n))) ) ) (IF srch_result (PROGN (setq sel_key nil) (NEW_DIALOG "srchres" num) ;;; (mode_tile "dtl_desg" 1) ;;; (mode_tile "sht_locn" 1) (action_tile "Results" "(setq sel_key(get_tile\"Results\"))(setq sel_str (nth (read sel_key) srch_result))(set_srchbubl)(if(eq $reason 4)(done_dialog 1))") (action_tile "Filter" "(setq fltr_str (strcat \"*\"(get_tile \"filter_item\")\"*\"))(fltr_tnlist)") (action_tile "ok" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (START_LIST "Results" 3) (MAPCAR 'ADD_LIST srch_result) (END_LIST) (if (eq (START_DIALOG) 1) (if sel_key (progn (setq sel_key (itoa (1- (length (member (nth (read sel_key) srch_result) (reverse ids_list)))))) (set_tile "Major" sel_key) (mode_tile "Major" 2) (set_ids_ebox) (setq newitem (get_tile"new_item")) (set_wrap) (set_pview) ) (set_tile "error" "Nothing selected from search results") ) (set_tile "error" "Search cancelled") ) ) (set_tile "error" "Search string did not match any note") ) (PRINC) ) ;;;******************************************************************** (DEFUN fltr_tnlist (/) (SETQ fltr_result NIL) (set_tile "error" "") (foreach n srch_result (if (wcmatch (STRCASE n) (STRCASE fltr_str)) (SETQ fltr_result (APPEND fltr_result (LIST n))) ) ) (if fltr_result (progn (setq srch_result fltr_result) (START_LIST "Results" 3) (MAPCAR 'ADD_LIST fltr_result) (END_LIST) ) (SET_TILE "error" "No matches found for filter text!") ) ) ;;;******************************************************************** (DEFUN set_caps (/) (IF (EQ force_caps "1") (IF newitem (SETQ newitem (STRCASE newitem)) ) ) ) ;_ end of defun ;;;******************************************************************** (DEFUN pview (/) (IF (EQ (GET_TILE "force_caps") "1") (progn (setq newitem (strcase newitem)) (foreach n pview_lst (setq pview_lst (subst (strcase n) n pview_lst)) ) (SET_TILE "new_item" newitem) ) ) (START_LIST "note_view") (MAPCAR 'ADD_LIST pview_lst) (END_LIST) (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN get_dat_file () (if (not (findfile (STRCAT (GETVAR "dwgprefix") "ids.dat"))) (progn (setq tmp_datf (open (STRCAT (GETVAR "dwgprefix") "ids.dat") "w")) (close tmp_datf) ) ) (IF (SETQ ids_file (GETFILED "Open Typical Notes Data File" (STRCAT (GETVAR "dwgprefix") "ids.dat") "dat" 8 ) ;_ end of getfiled ) ;_ end of setq (PROGN (SETQ ids_list nil tndat_lst nil ) ;_ end of setq ;;; (SETQ ids_file (FINDFILE "ids.dat")) (SET_TILE "ids_path" ids_file) (IF (FINDFILE ids_file) (PROGN (SETQ ids_dat (OPEN (FINDFILE ids_file) "r")) (WHILE (SETQ str (READ-LINE ids_dat)) (IF (AND (EQ (SUBSTR str 1 1) (CHR 40)) ; Line begins with a parenthesis, and (EQ (SUBSTR str (STRLEN str) 1) (CHR 41)) ; Line ends with a parenthesis ) ;_ end of and (SETQ tndat_lst (APPEND tndat_lst (LIST (READ str)))) ; Then strip off string quotes and add/create tndat_lst (SETQ tndat_lst (APPEND tndat_lst (LIST (LIST str "" "" "65" (IF do_cmud "100" "125")))) ) ;_ end of SETQ ; Else add/create tndat_lst using the string ) ;_ end of if ) ;_ end of while (CLOSE ids_dat) (FOREACH n tndat_lst ; tndat_lst=Data list including specified detail bubble text (IF ids_list (SETQ ids_list (APPEND ids_list (LIST (CAR n)))) ; Extract note string from list (SETQ ids_list (LIST (CAR n))) ) ;_ end of if ) ;_ end of foreach ) ) (IF ids_list (IF (SETQ ids_lst (ACAD_STRLSORT ids_list)) ; Finally, sort the note list (SETQ ids_list ids_lst) (PRINC "\nNot enough memory to sort ids group list. ") ) ;_ end of if (set_tile "error" "*** NOTICE *** DAT file contains no notes! Add notes or open another file.") ) (chk_tnlst) (START_LIST "Major" 3) (MAPCAR 'ADD_LIST ids_list) (END_LIST) ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN set_ids_list (/) (IF ids_list (PROGN (IF ids_file (SET_TILE "ids_path" ids_file) ) ) (PROGN (SETQ ids_list nil tndat_lst nil tndat_ndx nil ) ;_ end of setq (if (not (findfile "ids.dat")) (progn (setq tmp_datf (open (STRCAT (GETVAR "dwgprefix") "ids.dat") "w")) (close tmp_datf) ) ) (SETQ ids_file (FINDFILE "ids.dat")) (SET_TILE "ids_path" ids_file) (SETQ ids_dat (OPEN ids_file "r")) (WHILE (SETQ str (READ-LINE ids_dat)) (IF (AND (EQ (SUBSTR str 1 1) (CHR 40)) ; Line begins with a parenthesis, and (EQ (SUBSTR str (STRLEN str) 1) (CHR 41)) ; Line ends with a parenthesis ) ;_ end of and (SETQ tndat_lst (APPEND tndat_lst (LIST (READ str)))) ; Then strip off string quotes and add/create tndat_lst (SETQ tndat_lst (APPEND tndat_lst (LIST (LIST str "" "" "65" (IF do_cmud "100" "125")))) ) ;_ end of SETQ ; Else add/create tndat_lst using the string ) ;_ end of if ) ;_ end of while (CLOSE ids_dat) (ids_sorter) ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN ids_sorter () (SETQ ndx_cnt 0 tndat_ndx nil ids_list nil ) (FOREACH n tndat_lst ; tndat_lst=Data list including specified detail bubble text (IF tndat_ndx (SETQ tndat_ndx (APPEND tndat_ndx (LIST (CONS (CAR n) ndx_cnt)))) (SETQ tndat_ndx (LIST (CONS (CAR n) ndx_cnt))) ) (SETQ ndx_cnt (1+ ndx_cnt)) (IF (AND ids_list (NOT (MEMBER (CAR n) ids_list))) (SETQ ids_list (APPEND ids_list (LIST (CAR n)))) ; Extract note string from list (IF ids_list NIL (SETQ ids_list (LIST (CAR n))) ) ) ;_ end of if ) ;_ end of foreach (IF ids_list (IF (SETQ ids_lst (ACAD_STRLSORT ids_list)) ; Finally, sort the note list (PROGN (SETQ ids_list ids_lst) (SETQ tndat_tas nil) (foreach n ids_list (IF tndat_tas (SETQ tndat_tas (APPEND tndat_tas (LIST (NTH (CDR (ASSOC n tndat_ndx)) tndat_lst)))) (SETQ tndat_tas (LIST (NTH (CDR (ASSOC n tndat_ndx)) tndat_lst))) ) ) (SETQ tndat_lst tndat_tas) ) (PRINC "\nNot enough memory to sort ids group list. ") ) ;_ end of if (SET_TILE "error" "*** NOTICE *** DAT file contains no notes! Add notes or open another file." ) ;_ end of set_tile ) ;_ end of IF ) ;;;******************************************************************** (DEFUN set_ids_ebox (/) (SETQ sel_key (GET_TILE "Major")) (SETQ note_txt (NTH (ATOI sel_key) ids_list)) (SET_TILE "new_item" note_txt) (res_thts note_txt) (IF (MEMBER note_txt tndat_lst);only true if note is a string and not a list in tndat_lst (PROGN (SET_TILE "add_bubble" "0") (SET_TILE "detail_desg" "") (SET_TILE "sheet_locn" "") (MODE_TILE "detail_desg" 1) (MODE_TILE "sheet_locn" 1) ) ;_ end of progn (PROGN (SETQ note_ctr 0 not_yet T ) ;_ end of setq (SETQ note_str (NTH (ATOI sel_key) ids_list)) (WHILE (AND (< note_ctr (LENGTH tndat_lst)) not_yet) (COND ((EQ (TYPE (NTH note_ctr tndat_lst)) 'LIST) (IF (EQ (CAR (NTH note_ctr tndat_lst)) note_str) (SETQ not_yet nil) ) ;_ end of if ) ) ;_ end of cond (SETQ note_ctr (1+ note_ctr)) ) ;_ end of while (IF (EQ (TYPE (NTH (1- note_ctr) tndat_lst)) 'LIST) (PROGN (SET_TILE "detail_desg" (NTH 1 (NTH (1- note_ctr) tndat_lst)) ) ;_ end of set_tile (SET_TILE "sheet_locn" (NTH 2 (NTH (1- note_ctr) tndat_lst)) ) ;_ end of set_tile (IF (AND (/= (NTH 3 (NTH (1- note_ctr) tndat_lst)) "") (EQ (TYPE (READ (NTH 3 (NTH (1- note_ctr) tndat_lst)))) 'INT ) ;_ end of EQ ) ;_ end of AND (SET_TILE "Wrap_value" (NTH 3 (NTH (1- note_ctr) tndat_lst)) ) ;_ end of set_tile ) ;_ end of IF (IF (EQ (LENGTH (NTH (1- note_ctr) tndat_lst)) 5) (PROGN (SET_TILE "leroy_size" (NTH 4 (NTH (1- note_ctr) tndat_lst))) (set_leroy (NTH 4 (NTH (1- note_ctr) tndat_lst))) ) ) (IF (AND (EQ (GET_TILE "detail_desg") "") (EQ (GET_TILE "sheet_locn") "") ) ;_ end of and (PROGN (SET_TILE "add_bubble" "0") (MODE_TILE "detail_desg" 1) (MODE_TILE "sheet_locn" 1) ) ;_ end of progn (PROGN (SET_TILE "add_bubble" "1") (MODE_TILE "detail_desg" 0) (MODE_TILE "sheet_locn" 0) ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN repl_item (/) (IF (EQ (TYPE (READ repl_key)) 'INT) (PROGN (SETQ exst_str (NTH (ATOI repl_key) ids_list) repl_str (GET_TILE "new_item") rslen (STRLEN repl_str) chrcnt 1 ) ;_ end of setq (SETQ new_ids_list (SUBST repl_str exst_str ids_list) ids_list new_ids_list ) ;_ end of setq ;;; (COND ;;; ((MEMBER exst_str tndat_lst) ; No bubble associated yet ;;; (COND ((EQ (GET_TILE "add_bubble") "0") ;;; ; No bubble associated this instance - No change ;;; (SETQ tndat_lst ;;; (SUBST repl_str ;;; exst_str ;;; tndat_lst ;;; ) ;_ end of subst ;;; ) ;_ end of setq ;;; ) ;;; ((EQ (GET_TILE "add_bubble") "1") ;;; ; Bubble associated this instance - add bubble data (SETQ tndat_lst (SUBST (CONS repl_str (LIST (GET_TILE "detail_desg") (GET_TILE "sheet_locn") (GET_TILE "Wrap_value") (GET_TILE "leroy_size") ) ;_ end of LIST ) ;_ end of cons exst_str tndat_lst ) ;_ end of subst ) ;_ end of setq ;;; ) ;;; ) ;_ end of cond ;;; ) ;;; ((ASSOC exst_str tndat_lst) ;;; (COND ((EQ (GET_TILE "add_bubble") "0") ;;; (SETQ tndat_lst ;;; (SUBST (CONS repl_str (CDR (ASSOC exst_str tndat_lst))) ;;; (ASSOC exst_str tndat_lst) ;;; tndat_lst ;;; ) ;_ end of subst ;;; ) ;_ end of setq ;;; ) ;;; ((EQ (GET_TILE "add_bubble") "1") ;;; (SETQ tndat_lst ;;; (SUBST ;;; (CONS ;;; repl_str ;;; (LIST (GET_TILE "detail_desg") ;;; (GET_TILE "sheet_locn") ;;; (GET_TILE "Wrap_value") ;;; (GET_TILE "leroy_size") ;;; ) ;_ end of LIST ;;; ) ;_ end of cons ;;; (ASSOC exst_str tndat_lst) ;;; tndat_lst ;;; ) ;_ end of subst ;;; ) ;_ end of setq ;;; ) ;;; ) ;_ end of cond ;;; ) ;;; ) ;_ end of cond (SET_TILE "new_item" "") (MODE_TILE "new_item" 2) (START_LIST "Major" 1 (ATOI repl_key)) (ADD_LIST repl_str) (END_LIST) (SET_TILE "Major" repl_key) (SET_TILE "new_item" (NTH (ATOI repl_key) ids_list)) (MODE_TILE "new_item" 3) (upd_ids_dat) ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN upd_ids_dat (/) (IF (AND new_ids_list (/= new_ids_list prev_tnlst)) (PROGN (IF ids_file NIL (SETQ ids_file (FINDFILE "ids.dat")) ) ;_ end of IF (SET_TILE "ids_path" ids_file) (SETQ ids_dat (OPEN ids_file "w")) (IF ids_dat (PROGN (FOREACH n tndat_lst (COND ((EQ (TYPE n) 'LIST) (SETQ tx_str (NTH 0 n) rslen (STRLEN tx_str) chrcnt 1 ) ;_ end of setq (IF (WCMATCH tx_str "*\"*") (WHILE (<= chrcnt rslen) (IF (EQ (SUBSTR tx_str chrcnt 1) "\"") (PROGN (SETQ tx_str (STRCAT (SUBSTR tx_str 1 (1- chrcnt)) (CHR 92) (CHR 34) (SUBSTR tx_str (1+ chrcnt)) ) ;_ end of strcat rslen (STRLEN tx_str) chrcnt (STRLEN (STRCAT (SUBSTR tx_str 1 (1- chrcnt)) (CHR 92) (CHR 34) ) ;_ end of strcat ) ;_ end of strlen ) ;_ end of setq ) ;_ end of progn ) ;_ end of if (SETQ chrcnt (1+ chrcnt)) ) ;_ end of while ) ;_ end of if (SETQ ids_item (STRCAT (CHR 40) "\"" tx_str "\" \"" (NTH 1 n) "\" \"" (NTH 2 n) "\" \"" (NTH 3 n) (IF (EQ (LENGTH n) 5) (STRCAT "\" \"" (NTH 4 n) "\"" (CHR 41) ) ;_ end of STRCAT (STRCAT "\" \"" (IF do_cmud "100" "125" ) ;_ end of IF "\"" (CHR 41) ) ;_ end of STRCAT ) ;_ end of IF ) ;_ end of strcat ) ;_ end of setq (WRITE-LINE ids_item ids_dat) ) ((EQ (TYPE n) 'STR) (WRITE-LINE n ids_dat) ) ) ;_ end of cond ) ;_ end of foreach (IF (AND ids_dat tndat_lst) (SET_TILE "error" (STRCAT "Saved changes to " ids_file)) ) ;_ end of IF ) ;_ end of PROGN (PROGN (SET_TILE "error" "Unable to open .dat file!") ) ;_ end of PROGN ) ;_ end of IF (SETQ new_ids_list NIL) (CLOSE ids_dat) ) ;_ end of progn (PROGN (SET_TILE "error" "Nothing to Save!") ) ;_ end of PROGN ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN add_ids_item (/) (IF (EQ newitem "") nil (PROGN (SETQ new_ids_list ids_list) (SETQ ids_list (APPEND ids_list (LIST newitem))) (chk_tnlst) (START_LIST "Major" 3) (MAPCAR 'ADD_LIST ids_list) (END_LIST) (IF tndat_lst (COND ((EQ (GET_TILE "add_bubble") "0") (SETQ tndat_lst (APPEND tndat_lst (LIST (LIST newitem "" "" (GET_TILE "Wrap_value") (GET_TILE "leroy_size")) ) ;_ end of LIST ) ;_ end of APPEND ) ;_ end of setq ) ((EQ (GET_TILE "add_bubble") "1") (SETQ tndat_lst (APPEND tndat_lst (LIST (LIST newitem (GET_TILE "detail_desg") (GET_TILE "sheet_locn") (GET_TILE "Wrap_value") (GET_TILE "leroy_size") ) ;_ end of list ) ;_ end of list ) ;_ end of append ) ;_ end of setq ) ) ;_ end of cond (COND ((EQ (GET_TILE "add_bubble") "0") (SETQ tndat_lst (LIST (LIST newitem "" "" (GET_TILE "Wrap_value")) ) ;_ end of LIST ) ;_ end of SETQ ) ((EQ (GET_TILE "add_bubble") "1") (SETQ tndat_lst (LIST (LIST newitem (GET_TILE "detail_desg") (GET_TILE "sheet_locn") (GET_TILE "Wrap_value") (GET_TILE "leroy_size") ) ;_ end of list ) ;_ end of list ) ;_ end of setq ) ) ;_ end of cond ) ;_ end of if (ids_sorter) (upd_ids_dat) (SETQ newitem nil) ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN set_pview (/ nxt_char chr_indx wrap_int var_indx fst_break lst_break) (SETQ char_index 1 tmp1_index 1 ) ;_ end of setq (IF (= newitem "") (PRINC) (PROGN (SETQ note_txt newitem) (IF wrap_len (PROGN (SETQ chr_indx 1 var_indx 1 wrap_int (ATOI wrap_len) ) ;_ end of setq (SETQ nxt_char (SUBSTR note_txt chr_indx 1)) (WHILE (AND (NOT note_done) (NOT (EQ "" note_txt))) (IF (EQ nxt_char " ") ;if breakpoint (PROGN (IF lst_break (SETQ fst_break lst_break) ) ;_ end of if (SETQ lst_break chr_indx) ) ;_ end of PROGN ) ;_ end of if (IF (EQ nxt_char "") ;if endpoint (PROGN (IF lst_break (SETQ fst_break lst_break) ) ;_ end of if (SETQ lst_break chr_indx done_note T ) ;_ end of setq ) ;_ end of PROGN ) ;_ end of if (COND ((> lst_break wrap_int) (SET (READ (STRCAT "typ_t" (ITOA var_indx))) (IF fst_break (SUBSTR note_txt 1 (1- fst_break)) (SUBSTR note_txt 1 (1- lst_break)) ) ;_ end of if ) ;_ end of set (SETQ note_txt (IF fst_break (SUBSTR note_txt (1+ fst_break)) (SUBSTR note_txt (1+ lst_break)) ) ;_ end of if chr_indx 1 var_indx (1+ var_indx) fst_break nil lst_break nil nxt_char (SUBSTR note_txt 1 1) ) ;_ end of setq ) ((EQ lst_break wrap_int) ;if 2nd break = wrap length (SET (READ (STRCAT "typ_t" (ITOA var_indx))) (SUBSTR note_txt 1 (1- lst_break)) ) ;_ end of set (IF (> (STRLEN note_txt) wrap_int) (SETQ note_txt (SUBSTR note_txt (1+ lst_break)) chr_indx 1 var_indx (1+ var_indx) fst_break nil lst_break nil nxt_char (SUBSTR note_txt 1 1) ) ;_ end of setq (SETQ nxt_char "" note_done T ) ;_ end of setq ) ;_ end of if ) ((<= (STRLEN note_txt) wrap_int) (SET (READ (STRCAT "typ_t" (ITOA var_indx))) note_txt ) ;_ end of set (SETQ nxt_char "" note_done T ) ;_ end of setq ) ) ;_ end of COND (SETQ chr_indx (1+ chr_indx) nxt_char (SUBSTR note_txt chr_indx 1) ) ;_ end of setq ) ;_ end of WHILE (IF note_done (SETQ note_done nil) (PROGN (SET (READ (STRCAT "typ_t" (ITOA var_indx))) note_txt ) ;_ end of set ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN (SETQ typ_t1 note_txt) ;Do this if NO WRAP ) ;_ end of IF (PRINC fst_break) (PRINC lst_break) (IF typ_t1 (PROGN (SETQ pview_lst (LIST typ_t1)) (IF typ_t2 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t2))) (IF typ_t3 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t3))) (IF typ_t4 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t4))) (IF typ_t5 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t5)) ) ;_ end of setq (IF typ_t6 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t6) ) ;_ end of append ) ;_ end of setq (IF typ_t7 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t7) ) ;_ end of append ) ;_ end of setq (IF typ_t8 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t8) ) ;_ end of append ) ;_ end of setq (IF typ_t9 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t9) ) ;_ end of append ) ;_ end of setq (IF typ_t10 (PROGN (SETQ pview_lst (APPEND pview_lst (LIST typ_t10 ) ;_ end of list ) ;_ end of append ) ;_ end of setq ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if ) ;_ end of progn (PRINC) ) ;_ end of if (pview) (SETQ typ_t1 nil typ_t2 nil typ_t3 nil typ_t4 nil typ_t5 nil typ_t6 nil typ_t7 nil typ_t8 nil typ_t9 nil typ_t10 nil fst_break nil lst_break nil ) ;_ end of setq (PRINC "\010\010\010\010\010\010 \010\010\010\010\010\010" ) ;_ end of princ ) ;_ end of PROGN ) ;_ end of IF (SET_TILE "error" "") (PRINC) ) ;_ end of DEFUN ;;;******************************************************************** (DEFUN intchk (ivar /) (IF (ATOI ivar) nil (SETQ ivar "0") ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN chk_tnlst () (setq tmpids_lst nil) (IF ids_list (PROGN (FOREACH n ids_list (IF (AND tmpids_lst n) (SETQ tmpids_lst (APPEND tmpids_lst (LIST n))) (IF n (SETQ tmpids_lst (LIST n)) ) ) ) (SETQ tmpids_lst (ACAD_STRLSORT tmpids_lst)) (SETQ ids_list tmpids_lst) (SETQ prev_tnlst ids_lst) ) ) ) ;;;******************************************************************** (DEFUN del_lines () (SETQ del_note (NTH (ATOI del_key) ids_list)) (SETQ ids_list (SUBST nil del_note ids_list)) (chk_tnlst) (SETQ new_ids_list ids_list) (SETQ del_dat (ASSOC del_note tndat_lst)) (SETQ tndat_lst (SUBST nil del_dat tndat_lst)) (SETQ tmpids_lst NIL) (FOREACH n tndat_lst (IF (AND tmpids_lst n) (SETQ tmpids_lst (APPEND tmpids_lst (LIST n))) (IF n (SETQ tmpids_lst (LIST n)) ) ) ) (SETQ tndat_lst tmpids_lst) (START_LIST "Major") (MAPCAR 'ADD_LIST new_ids_list) (END_LIST) (upd_ids_dat) (MODE_TILE "Major" 2) (SET_TILE "Major" del_key) (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!***|;