/* This Cadl, 'TEXTBOX.CDP' does the following: It will write four files to your Cadkey root directory, called "BOOK1.TXT" through "BOOK4.TXT" (initially only "BOOK1.TXT"). You will be able to save your most used notes to those files, delete text from them or add text to them. Furthermore, you'll be able to select from these books the text to place into Cadkey. As you select you can specify new line or same line (same line includes a space) for each pick. You will also have control over note attributes. Once you're done selecting, you'll have two options: Option 1: PLACENEW - Place the new note into Cadkey, having an option to change the note angle by key-in or picking a note or dimension for an angle. Option 2: REPLACE - Replaces existing notes in Cadkey with the new note according to the attributes of each note being changed. Then another part of the Cadl: COMBINE: Allows you pick text in Cadkey (having control over "new line or same line [same line includes a space] for each pick") and either placing it back onto the screen as a single note, or saving the text to a BOOK. When you're done, you have the option to delete the Text you picked to combine. This Cadl has a Dialog box interface, therefore it will not work in CK97. Graditude: To GOD, my Family and Brian Ott Written by Hans Winkler 03/1999 */ SLIST $$bookfile[0][0], $$combo[0][0], $$existfile[0][0] int f_auf, b_kzahl, t_nfo[0], e_att[0], tinfo[0], eattrb[0] DG_RET_ON_SEL = 0x00000001 DG_CANCEL = 0x00000008 DG_DEFAULT = 0x00002000 DG_FROZEN = 0x00000002 sel_ttn = 1 SPRINT $neworsame, "New Line for each select" flbuttn = 0 $$combo[0] = "(1)Box" $$combo[1] = "(2)Bold" :START SPRINT $sel_text, "" SPRINT $selmode, "*** Select Mode ---> OFF! ***" if (b_kzahl == 0) b_kzahl = 1 if (f_auf > 0) goto LOAD_FILE ARRAY t_att[9] t_att[0] = @notefont if (@notefont == 0){ t_att[0] = 1 $font = "(1)Box" } if (@notefont == 1){ t_att[0] = 2 $font = "(2)Bold" } t_att[1] = @notefill t_att[2] = @noteuln t_att[3] = 0 t_att[4] = @noteslnt t_att[5] = 180*@noteang/3.141592653589793 t_att[6] = @noteht t_att[7] = @txtasp t_att[8] = @noteline :LOAD_FILE f_auf = 1 if (t_att[0] == 1) $font = "(1)Box" if (t_att[0] == 2) $font = "(2)Bold" if (b_kzahl == 1){ SPRINT $book, "%s%s", @suppath, "book1.txt" SPRINT $activebook, "*** Book # 1 is currently active ***" } if (b_kzahl == 2){ SPRINT $book, "%s%s", @suppath, "book2.txt" SPRINT $activebook, "*** Book # 2 is currently active ***" } if (b_kzahl == 3){ SPRINT $book, "%s%s", @suppath, "book3.txt" SPRINT $activebook, "*** Book # 3 is currently active ***" } if (b_kzahl == 4){ SPRINT $book, "%s%s", @suppath, "book4.txt" SPRINT $activebook, "*** Book # 4 is currently active ***" } SET DEVIN, $book if (@error == 0){ CLOSE DEVIN goto LOAD_LAST_FILE } SET DEVOUT, $book if (@error != 0) exit CLOSE DEVOUT :LOAD_LAST_FILE zz = 0 ww = -1 SET DEVIN, $book if (@error == 1){ PAUSE "ERROR: File not found!" goto LOAD_FILE } :GET_FILE_INFO INPUT "%[^\r\n]%\r\n", $$bookfile[zz] zz = zz + 1 ww = ww + 1 if (@nread > 0) goto GET_FILE_INFO CLOSE DEVIN :DIALOG_OPEN dg_init_dialog 25, 60, 35, " >>> The Text Mall <<< (written by Hans Winkler)", 0, 0, 4, 0 db = @ERROR dg_add_list db, 0, 9.75, 21.50, 10, 35, ww, $$bookfile, 0, 0, 0 dg_add_button db, 1, 3.50, 48.00, 10, "Add Text", 0, 0, 0 dg_add_button db, 2, 5.00, 48.00, 10, "Del Text", 0, 0, 0 dg_add_button db, 3, 6.50, 48.00, 10, "Clear Sel", 0, 0, 0 dg_add_button db, 4, 8.00, 48.00, 10, "Select", 0, 0, 0 dg_add_button db, 5, 22.00, 21.50, 13, "Replace Text", 0, 0, 0 dg_add_button db, 6, 22.00, 35.00, 15, "Place new Text", 0, 0, 0 dg_add_button db, 7, 3.50, 21.00, 10, "Book 1", 0, 0, 0 dg_add_button db, 8, 3.50, 32.00, 10, "Book 2", 0, 0, 0 dg_add_button db, 9, 5.00, 26.50, 10, "Book 3", 0, 0, 0 dg_add_button db, 10, 5.00, 37.50, 10, "Book 4", 0, 0, 0 dg_add_button db, 11, 22.00, 50.25, 8, "Close", 0, 0, DG_CANCEL dg_add_box db, 12, 0.25, 0.25, 18.50, 19.00, "Note Attributes", 0, 0, 0 dg_add_note db, 13, 2.00, 1.50, "Font", 0, 0, 0 dg_add_note db, 14, 3.25, 1.25, "Txt Hgt", 0, 0, 0 dg_add_note db, 15, 5.25, 1.25, "Slant", 0, 0, 0 dg_add_note db, 16, 6.50, 1.25, "Angle", 0, 0, 0 dg_add_note db, 17, 8.50, 1.25, "Aspect", 0, 0, 0 dg_add_note db, 18, 9.75, 1.25, "Spacing", 0, 0, 0 dg_add_check db, 19, 12.00, 1.50, t_att[3], "Mirror", 0, 0, 0 dg_add_check db, 20, 13.75, 1.50, t_att[2], "Underline", 0, 0, 0 dg_add_check db, 21, 15.50, 1.50, t_att[1], "Filled Font", 0, 0, 0 dg_add_combo db, 22, 1.75, 9.25, 2, 8, 1, $font, 2, $$combo, 0, 0, 0 rem dg_add_text_int db, 22, 1.75, 9.25, 8, "%d", t_att[0], 0, 0, 0 dg_add_text_double db, 23, 3.25, 9.25, 8, "%.6f", t_att[6], 0, 0, 0 dg_add_text_double db, 24, 5.00, 9.25, 8, "%.6f", t_att[4], 0, 0, 0 dg_add_text_double db, 25, 6.50, 9.25, 8, "%.6f", t_att[5], 0, 0, 0 dg_add_text_double db, 26, 8.25, 9.25, 8, "%.6f", t_att[7], 0, 0, 0 dg_add_text_double db, 27, 9.75, 9.25, 8, "%.6f", t_att[8], 0, 0, 0 dg_add_note db, 28, 1.75, 21.75, $activebook, 0, 0, 0 dg_add_note db, 29, 20.25, 25.00, $selmode, 0, 0, 0 dg_add_button db, 30, 17.50, 1.25, 18, "System Attributes", 0, 0, 0 dg_add_box db, 31, 0.25, 20.00, 23.00, 39.00, "Note Books", 0, 0, 0 dg_add_box db, 32, 19.50, 0.25, 3.75, 19.00, "Combine Text", 0, 0, 0 dg_add_button db, 33, 21.25, 3.50, 13, "Combine", 0, 0, 0 dg_add_button db, 34, 7.50, 21.375, 26.00, $neworsame, 0, 0, 0 dg_draw_dialog db PROMPT "Please make a selection..." :DIA_LOOP dg_run_dialog db /* Add Text button pressed */ if (@error == 1) goto ADDTEXT /* Start Del Text button pressed */ if (@error == 2) goto DELTEXT /* Start Clear Select button pressed */ if (@error == 3) goto CLEANBUTTON /* Start Select button pressed */ if (@error == 4){ flbuttn = flbuttn + 1 goto SELECT } /* Start Replace Text button pressed */ if (@error == 5) goto REPLACE /* Start Place new Text button pressed */ if (@error == 6) goto PLACENEW /* Book 1 button pressed */ if (@error == 7){ b_kzahl = 1 goto RELOAD } /* Book 2 button pressed */ if (@error == 8){ b_kzahl = 2 goto RELOAD } /* Book 3 button pressed */ if (@error == 9){ b_kzahl = 3 goto RELOAD } /* Book 4 button pressed */ if (@error == 10){ b_kzahl = 4 goto RELOAD } /* The Cancel Key */ if (@error == 11) goto CLEARDIALOG /* The System Attributes Key pressed*/ if (@error == 30) goto SETATTRIB /* The Combine Text Key pressed*/ if (@error == 33) goto COMBINE /* The Combine Text Key pressed*/ if (@error == 34) goto BUTTONCHG :ADDTEXT SPRINT $addtext, "" SPRINT $testfile, "" SPRINT $zeile,"Type Text to be added to active Book # %d...", b_kzahl GETSTR $zeile, $addtext, $addtext if (@error == 1){ PROMPT "Please make a selection..." goto DIA_LOOP } CALL STRLEN, $addtext, c_heck if (c_heck < 1) goto ADDTEXT SET DEVIN, $book INPUT "%[^\r\n]%*[\r\n]", $testfile CLOSE DEVIN CALL STRLEN, $testfile, c_heck if (c_heck < 1) goto NOLINE SET DEVOUT, $book, 1 PRINT "\n%s", $addtext CLOSE DEVOUT goto RELOAD :NOLINE SET DEVOUT, $book, 1 PRINT "%s", $addtext CLOSE DEVOUT goto RELOAD /* Finish with Add Text button pressed */ /* Start of Del Text button Code */ :DELTEXT f___ime = 0 dg_get_list db, 0 uu = @error dg_get_list_text db, 0, uu if (@error != 0) goto DIA_LOOP SPRINT $delstr, @strdat k = 0 l = -1 SET DEVIN, $book :MORELINES INPUT "%[^\r\n]%*[\r\n]", $$existfile[k] k = k + 1 l = l + 1 if (@nread > 0) goto MORELINES CLOSE DEVIN k = 0 oneline = 0 SET DEVOUT, $book :PUTBACK if (oneline > 0) goto PRINTLINE CALL STRCMP, $$existfile[k], $delstr, zzz if (zzz == 0){ oneline = 1 k = k + 1 if (k == l) goto PRINTFIN goto PUTBACK } :PRINTLINE if (f___ime == 0){ PRINT "%s", $$existfile[k] k = k + 1 f___ime = 1 if (k == l) goto PRINTFIN goto PUTBACK } PRINT "\n%s", $$existfile[k] k = k + 1 if (k == l) goto PRINTFIN goto PUTBACK :PRINTFIN CLOSE DEVOUT f___ime = 0 goto RELOAD /* End of Del Text button Code */ :SELECT SPRINT $selmode, "*** Select Mode ---> ON! ***" dg_set_note db, 29, $selmode dg_get_list db, 0 xy = @error if (xy < 0) goto DIA_LOOP dg_get_list_text db, 0, xy if (sel_ttn == 1) goto LOOP3 if (sel_ttn == 2) goto LOOP4 :LOOP3 if (flbuttn <= 1){ SPRINT $dummy, "%s", @strdat CALL STRCAT, $sel_text, $dummy goto DIA_LOOP } SPRINT $dummy, "\n%s", @strdat CALL STRCAT, $sel_text, $dummy goto DIA_LOOP :LOOP4 if (flbuttn <= 1){ SPRINT $dummy, "%s", @strdat CALL STRCAT, $sel_text, $dummy goto DIA_LOOP } SPRINT $dummy, "%s%s", " ", @strdat CALL STRCAT, $sel_text, $dummy goto DIA_LOOP /* Finish Select button pressed */ :SETATTRIB ARRAY t_att[9] t_att[0] = @notefont if (@notefont == 0){ t_att[0] = 1 $font = "(1)Box" } if (@notefont == 1){ t_att[0] = 2 $font = "(2)Bold" } t_att[1] = @notefill t_att[2] = @noteuln t_att[3] = 0 t_att[4] = @noteslnt t_att[5] = 180*@noteang/3.141592653589793 t_att[6] = @noteht t_att[7] = @txtasp t_att[8] = @noteline dg_set_check db, 19, t_att[3] dg_set_check db, 20, t_att[2] dg_set_check db, 21, t_att[1] dg_set_combo_list_active db, 22, t_att[0] dg_set_combo_string db, 22, $font dg_set_text_double db, 23, t_att[6] dg_set_text_double db, 24, t_att[4] dg_set_text_double db, 25, t_att[5] dg_set_text_double db, 26, t_att[7] dg_set_text_double db, 27, t_att[8] goto DIA_LOOP :CLEANBUTTON SPRINT $sel_text, "" SPRINT $selmode, "*** Select Mode ---> OFF! ***" dg_set_note db, 29, $selmode goto DIA_LOOP /* Finish Clear Select button pressed */ :RELOAD dg_erase_dialog db dg_free_dialog db goto LOAD_FILE :PLACENEW CALL STRLEN, $sel_text, c_heck if (c_heck < 1) goto SELERROR dg_get_check db, 19 t_att[3] = @error dg_get_check db, 20 t_att[2] = @error dg_get_check db, 21 t_att[1] = @error dg_get_combo_list_active db, 22 t_att[0] = @error if (t_att[0] == 1) t_att[0] = 2 if (t_att[0] == 0) t_att[0] = 1 dg_get_text_double db, 23 t_att[6] = @error dg_get_text_double db, 24 t_att[4] = @error if ((t_att[4] > 31)||(t_att[4] < -31)) t_att[4] = 0 dg_get_text_double db, 25 t_att[5] = @error dg_get_text_double db, 26 t_att[7] = @error dg_get_text_double db, 27 t_att[8] = @error ARRAY t_nfo[6] t_nfo[0] = 0 t_nfo[1] = 0 t_nfo[2] = 1 t_nfo[3] = 0 t_nfo[4] = 0 t_nfo[5] = 0 ARRAY e_att[9] e_att[0] = 0 e_att[1] = @color e_att[2] = @color e_att[3] = @pen e_att[4] = @level e_att[5] = 1 e_att[6] = 1 e_att[7] = 0 e_att[8] = 0 dg_erase_dialog db dg_free_dialog db oldtexta = t_att[5] flbuttn = 0 wobistdu = 1 /* Start calculate longest line in note and the amount of lines*/ CALL STRLEN, $sel_text, jec ct = 0 mun = 1 weite1 = 0 weite2 = 0 :PL3 ct = ct + 1 weite1 = weite1 + 1 if ($sel_text[ct] == 10){ mun = mun + 1 if (weite2 <= weite1) weite2 = weite1 weite1 = -1 } if (ct > jec-1){ if (weite2 <= weite1) weite2 = weite1 goto PL2 } goto PL3 :PL2 /* End calculate longest line in note and the amount of lines */ hohe = (t_att[6]*mun) + (t_att[6]*t_att[8]*(mun-1)) :MULTINOTE SPRINT $schrift1,"Place Text..Noteangle is %.2f°..ESC or F10 to Quit", t_att[5] GETCUR $schrift1, 6, 0,weite2*t_att[6]*t_att[7],hohe,0,LB,t_att[5],\ "Align2Dim", "KeyinAngle", "B2Dialog" if ((@key == -3)||(@key == -2)){ t_att[5] = oldtexta goto END } if (@key == 1) goto ALIGN2DIM if (@key == 2) goto KEYIN if (@key == 3){ t_att[5] = oldtexta flbuttn = 0 CLEAR $dummy, $sel_text SPRINT $sel_text, "" goto START } x_loc = @xview - ((hohe-t_att[6])*sin(t_att[5])) y_loc = @yview + ((hohe-t_att[6])*cos(t_att[5])) NNOTE x_loc, y_loc, @depth, $sel_text, t_nfo, t_att, e_att goto MULTINOTE :KEYIN GETFLT "Key-in new Note angle...", t_att[5], t_att[5] if ((@key == -3)||(@key == -2)) goto MULTINOTE if (@key == -1) goto MULTINOTE if ((t_att[5]<0)||(t_att[5]>360)){ PAUSE "Note angle must be between 0° and 360°...try again" t_att[5] = 0 goto KEYIN } goto MULTINOTE :ALIGN2DIM GETENT "Pick Dimension or Text for orientation...", entity if ((@key == -3)||(@key == -2)) goto MULTINOTE if (entity <= 7){ PAUSE "Please select Text or Dimensions for Note angle..." goto ALIGN2DIM } t_att[5] = @txtatt[5] goto MULTINOTE :REPLACE CALL STRLEN, $sel_text, c_heck if (c_heck <= 1) goto SELERROR dg_erase_dialog db dg_free_dialog db :TAG GETMENU "Select Note(s) to be changed...",\ "Single", "-", "Window", "Polygon", "-", "-", "All Dsp",,,,1 if (@key < 0) goto END if ((@key == 2)||(@key == 5)||(@key == 6)) goto TAG SET MASK, 15 GETENTM @key, element quant = 0 flbuttn = 0 :ENTITIES if ((quant = quant+1) > element) goto END GETNEXT enttype,,idid x1 = @fltdat[0] y1 = @fltdat[1] z1 = @fltdat[2] /* Start calculate longest line in note and the amount of lines*/ CALL STRLEN, @strdat, jec ct = 0 mun = 1 weite1 = 0 weite2 = 0 :PL4 ct = ct + 1 weite1 = weite1 + 1 if (@strdat[ct] == 10){ mun = mun + 1 if (weite2 <= weite1) weite2 = weite1 weite1 = -1 } if (ct > jec-1){ if (weite2 <= weite1) weite2 = weite1 goto PL5 } goto PL4 :PL5 /* End calculate longest line in note and the amount of lines */ hohe = (@txtatt[6]*mun) + (@txtatt[6]*@txtatt[8]*(mun-1)) x1 = x1 - ((hohe-@txtatt[6])*sin(@txtatt[5])) y1 = y1 + ((hohe-@txtatt[6])*cos(@txtatt[5])) DELENT idid NNOTE x1, y1, z1, $sel_text, @txtinfo, @txtatt, @entatt goto ENTITIES CLEARSEL 1 goto END /* Finish Replace Text button pressed */ /************* Start of Combine Text **************/ :COMBINE dg_erase_dialog db dg_free_dialog db :NEU_TEXT ARRAY tattrb[9] ARRAY tinfo[6] ARRAY eattrb[9] ARRAY id[102] Z = 0 firstline = 0 testsize = 0 SPRINT $newnote, "" defbuttn = 1 SPRINT $P, "Every pick to a NEW LINE..." :ADDSTRING SET MASK, 15 GETCUR $P,1,0,,,,,,"New Line","Same Line","ClearSel",\ "Done","B2Dialog",,,,,,4 if ((@key == -3)||(@key == -2)) goto END if (@key == 1){ defbuttn = 1 SPRINT $P, "Every pick to a NEW LINE..." goto ADDSTRING } if (@key == 2){ defbuttn = 2 SPRINT $P, "Every pick to SAME LINE..." goto ADDSTRING } if (@key == 3){ defbuttn = 1 SPRINT $P, "Every pick to a NEW LINE..." SPRINT $newnote, "" CLEAR id, Z, testsize goto NEU_TEXT } if (@key == 4) goto NEUEZEILE if (@key == 5) goto START GETENTXY @xview,@yview,entype,0,noteid if (@error == 1){ PAUSE "Entity not found... to continue" goto ADDSTRING } if (testsize == 1) goto GETIDSEC if (testsize == 0){ Z=Z+1 id[Z] = noteid testsize = 1 tattrb[0] = @txtatt[0] tattrb[1] = @txtatt[1] tattrb[2] = @txtatt[2] tattrb[3] = @txtatt[3] tattrb[4] = @txtatt[4] tattrb[5] = @txtatt[5] tattrb[6] = @txtatt[6] tattrb[7] = @txtatt[7] tattrb[8] = @txtatt[8] tinfo[0] = @txtinfo[0] tinfo[1] = @txtinfo[1] tinfo[2] = @txtinfo[2] tinfo[3] = @txtinfo[3] tinfo[4] = @txtinfo[4] tinfo[5] = @txtinfo[5] eattrb[0] = @entatt[0] eattrb[1] = @entatt[1] eattrb[2] = @entatt[2] eattrb[3] = @entatt[3] eattrb[4] = @entatt[4] eattrb[5] = @entatt[5] eattrb[6] = @entatt[6] eattrb[7] = @entatt[7] eattrb[8] = @entatt[8] goto DOADDNOTE } :GETIDSEC Z=Z+1 if (Z == 99) PAUSE "CAUTION...you may only pick 1 more Note, or Cadl Ends! Press F10..." if (Z > 100) goto END id[Z] = noteid :DOADDNOTE if (defbuttn == 1) goto LOOP1 if (defbuttn == 2) goto LOOP2 :LOOP1 if (firstline == 0){ SPRINT $newnote, @strdat firstline = 1 goto ADDSTRING } SPRINT $dumm, "\n%s", @strdat CALL STRCAT, $newnote, $dumm goto ADDSTRING :LOOP2 if (firstline == 0){ SPRINT $newnote, @strdat firstline = 1 goto ADDSTRING } SPRINT $dumm, "%s%s", " ", @strdat CALL STRCAT, $newnote, $dumm goto ADDSTRING :NEUEZEILE CALL STRLEN, $newnote, jec if (jec <= 1){ PAUSE "Select text before combining it...Press ESC or F10..." goto ADDSTRING } :C_LANDH /* Start calculate longest line in note and the amount of lines*/ ct = 0 mun = 1 weite1 = 0 weite2 = 0 :NOLINES ct = ct + 1 weite1 = weite1 + 1 if ($newnote[ct] == 10){ mun = mun + 1 if (weite2 <= weite1) weite2 = weite1 weite1 = -1 } if (ct > jec-1){ if (weite2 <= weite1) weite2 = weite1 goto PL1 } goto NOLINES :PL1 /* End calculate longest line in note and the amount of lines */ hohe = (tattrb[6]*mun) + (tattrb[6]*tattrb[8]*(mun-1)) :TEXTSTELLE SPRINT $schrift1,"Place Text... Noteangle is %f°...", tattrb[5] GETCUR $schrift1, 6, 0, weite2*tattrb[6]*tattrb[7],hohe,0,LB,tattrb[5],\ "Save2Book", "Align2Dim", "KeyinAngle", "B2Dialog",,,,,,,-1 if ((@key == -3)||(@key == -2)) goto END if (@key == -1) goto DEL1 if (@key == 1) goto SAVE2BOOK if (@key == 2) goto ALIGN1 if (@key == 3) goto KEYIN1 if (@key == 4) goto START x_loc = @xview - ((hohe-tattrb[6])*sin(tattrb[5])) y_loc = @yview + ((hohe-tattrb[6])*cos(tattrb[5])) NNOTE x_loc, y_loc, @depth, $newnote, tinfo, tattrb, eattrb goto TEXTSTELLE :DEL1 radier = 0 GETMENU "Do you wish to delete the Note(s) picked?...", "No_Quit", "Yes_Quit",\ "B2Dialog", "No2Combi", "Yes2Combi",,,,,,1 if (@key == -3) goto END if (@key == -2) goto NEU_TEXT if (@key == 1) goto END if (@key == 2){ radier = 1 goto DELSTR } if (@key == 3){ CLEAR id, Z, testsize goto START } if (@key == 4) goto NEU_TEXT if (@key == 5){ radier = 2 goto DELSTR } :DELSTR DELENT id[Z] Z=Z-1 if (Z < 1) goto DELFIN goto DELSTR :DELFIN if (radier == 2){ CLEAR id, Z, testsize goto NEU_TEXT } if (radier == 1) goto END :SAVE2BOOK book_num = b_kzahl SPRINT $op,"%s %d","Current book open is book #",book_num GETMENU $op, "Book#1", "Book#2", "Book#3", "Book#4",,,,,,,book_num if (@key == -3) goto END if (@key == -2) goto TEXTSTELLE if (@key == 1){ SPRINT $sbook, "%s%s", @suppath, "book1.txt" SET DEVOUT, $sbook, 3 PRINT "%s\n", $newnote CLOSE DEVOUT goto TEXTSTELLE } if (@key == 2){ SPRINT $sbook, "%s%s", @suppath, "book2.txt" SET DEVOUT, $sbook, 3 PRINT "%s\n", $newnote CLOSE DEVOUT goto TEXTSTELLE } if (@key == 3){ SPRINT $sbook, "%s%s", @suppath, "book3.txt" SET DEVOUT, $sbook, 3 PRINT "%s\n", $newnote CLOSE DEVOUT goto TEXTSTELLE } if (@key == 4){ SPRINT $sbook, "%s%s", @suppath, "book4.txt" SET DEVOUT, $sbook, 3 PRINT "%s\n", $newnote CLOSE DEVOUT goto TEXTSTELLE } :KEYIN1 GETFLT "Key-in new Note angle...", tattrb[5], tattrb[5] if ((@key == -3)||(@key == -2)) goto TEXTSTELLE if (@key == -1) goto TEXTSTELLE if ((tattrb[5]<0)||(tattrb[5]>360)){ PAUSE "Note angle must be between 0° and 360°...try again" tattrb[5] = 0 goto KEYIN1 } goto TEXTSTELLE :ALIGN1 GETENT "Pick Dimension or Text for orientation...", entity if ((@key == -3)||(@key == -2)) goto TEXTSTELLE if (entity <= 7){ PAUSE "Please select Text or Dimensions for Note angle..." goto ALIGN1 } tattrb[5] = @txtatt[5] goto TEXTSTELLE /************* End of Combine Text **************/ :BUTTONCHG if (sel_ttn == 1){ SPRINT $neworsame, "Same Line for each select" dg_del_ent db, 34 dg_add_button db, 34, 7.50, 21.375, 26.00, $neworsame, 0, 0, 0 sel_ttn = 2 goto DIA_LOOP } if (sel_ttn == 2){ SPRINT $neworsame, "New Line for each select" dg_del_ent db, 34 dg_add_button db, 34, 7.50, 21.375, 26.00, "New Line for each select", 0, 0, 0 sel_ttn = 1 goto DIA_LOOP } :SELERROR dg_erase_dialog db dg_free_dialog db f___ime = 0 flbuttn = 0 sel_ttn = sel_ttn CLEAR $dummy, $sel_text SPRINT $sel_text, "" PAUSE "'NO TEXT' was selected to be placed...try again..." goto START :CLEARDIALOG dg_get_check db, 19 t_att[3] = @error dg_get_check db, 20 t_att[2] = @error dg_get_check db, 21 t_att[1] = @error dg_get_combo_list_active db, 22 t_att[0] = @error if (t_att[0] == 1) t_att[0] = 2 if (t_att[0] == 0) t_att[0] = 1 dg_get_text_double db, 23 t_att[6] = @error dg_get_text_double db, 24 t_att[4] = @error if ((t_att[4] > 31)||(t_att[4] < -31)) t_att[4] = 0 dg_get_text_double db, 25 t_att[5] = @error dg_get_text_double db, 26 t_att[7] = @error dg_get_text_double db, 27 t_att[8] = @error dg_erase_dialog db dg_free_dialog db :END CLEAR $$bookfile,$$combo,$$existfile,tinfo,eattrb,DG_RET_ON_SEL,DG_CANCEL,DG_DEFAULT,\ DG_FROZEN,sel_ttn,flbuttn,$sel_text,$selmode,$font,$book,$activebook,zz,ww,db,\ $addtext,$testfile,$zeile,c_heck,f___ime,uu,$delstr,k,l,oneline,zzz,xy,$dummy,\ oldtexta,wobistdu,jec,ct,mun,weite1,weite2,hohe,$schrift1,x_loc,y_loc,entity,\ element,quant,enttype,idid,x1,y1,z1,tattrb,id,Z,firstline,testsize,$newnote,\ defbuttn,$P,entype,noteid,$dumm,radier,book_num,$op,$sbook,$neworsame