MCVSMCombine Text Blocks PanzerCAD▓ ┬tCombine Text Blocks╓аБ/Combines multiple selected text blocks into one{ Combine TextLines Version 1.3 Written by: Matthew G. Pannzer PanzerCAD Services, Inc. } Procedure MAIN; LABEL 1; CONST KChrNum = 1000; VAR TextHand, FirstTextObjHand : HANDLE; TextLine, TextFileName, Progress : STRING; X, Y, PrevX1, PrevY1, PrevX2, PrevY2, X1, Y1, X2, Y2, X3, Y3, X4, Y4, GX1, GX2, GY1, GY2, ObjectNum, ObjectRatio, ProgressCount, TextHt, ReturnDist, TX, TY : REAL; AppendText : BOOLEAN; TextArray : DYNARRAY[ {Num of Text Blocks} ] OF STRING; i, TextLength : INTEGER; TextBlock: STRING; {еееееееееееееееее FindTop еее} Procedure FindTop; LABEL 1; BEGIN Group; TextHand := FSActLayer; GetBBox(TextHand, GX1, GY1, GX2, GY2); UnGroup; TextHand := FSActLayer; GetBBox(TextHand, X1, Y1, X2, Y2); REPEAT IF (Y1=GY1) THEN GOTO 1; TextHand := NextSObj(TextHand); GetBBox(TextHand, X1, Y1, X2, Y2); UNTIL (TextHand = NIL); 1: END; {еееееееееееееееее ShowProgress еее} Procedure ShowProgress; BEGIN ProgressCount := (ProgressCount+(1/ObjectRatio)); IF (ProgressCount>1) OR (ProgressCount=1)THEN Progress := 'PCS Combine Text Progress: ееее'; IF (ProgressCount>2) OR (ProgressCount=2)THEN Progress := 'PCS Combine Text Progress: ееееее'; IF (ProgressCount>3) OR (ProgressCount=3)THEN Progress := 'PCS Combine Text Progress: ееееееее'; IF (ProgressCount>4) OR (ProgressCount=4)THEN Progress := 'PCS Combine Text Progress: ееееееееее'; IF (ProgressCount>5) OR (ProgressCount=5)THEN Progress := 'PCS Combine Text Progress: ееееееееееее'; IF (ProgressCount>6) OR (ProgressCount=6)THEN Progress := 'PCS Combine Text Progress: ееееееееееееее'; IF (ProgressCount>7) OR (ProgressCount=7)THEN Progress := 'PCS Combine Text Progress: ееееееееееееееее'; IF (ProgressCount>8) OR (ProgressCount=8)THEN Progress := 'PCS Combine Text Progress: ееееееееееееееееее'; IF (ProgressCount>9) OR (ProgressCount=9)THEN Progress := 'PCS Combine Text Progress: ееееееееееееееееееее'; END; {еееееееееееееееее SaveOrAppend еее} Procedure SaveOrAppend; BEGIN AppendText := YNDialog('Append text to an existing file? (Select "No" to Save to a New File)'); IF AppendText = True THEN GetFile(TextFileName); IF AppendText = False THEN PutFile('Name of New File:', 'PCS Text Output', TextFileName); END; {еееееееееееееееееееееееееееееееееееее B E G I N еееееееееееееееее} BEGIN PushAttrs; ProgressCount := 0; AppendText := False; ObjectNum := Count((T=Text) & (SEL=TRUE)); IF ObjectNum = 0 THEN BEGIN SysBeep; SysBeep; AlrtDialog('You must select a column of text before running this command'); GOTO 1; END; ObjectRatio := (ObjectNum/10); Progress := 'PCS Combine Text Progress: ее'; Message(Progress); FindTop; TX := GX1; TY := GY1; TextHt := Y1-Y2; ReturnDist:= (1.5*TextHt); PrevY1 := Y1; i:= 0; TextBlock:=''; REPEAT i:= i+1; FindTop; ALLOCATE TextArray [1..i]; IF (PrevY1>(Y1+ReturnDist)) THEN TextArray[i] := Chr(13); TextArray[i] := Concat( TextArray[i], GetText(TextHand) ); IF ( i = 1 ) THEN BEGIN FirstTextObjHand := TextHand; SetDSelect( FirstTextObjHand ); END ELSE BEGIN SetText( FirstTextObjHand, Concat( GetText( FirstTextObjHand ), Chr(13), TextArray[i] ) ); DelObject(TextHand); END; IF (GY2=Y2) THEN TextArray[i]:= Concat( TextArray[i], Chr(13) ); PrevY1 := Y1; ShowProgress; Message(Progress); UNTIL (GY2=Y2); { DSelectAll; ReDrawAll; } SetSelect( FirstTextObjHand ); PopAttrs; 1: ClrMessage; END; Run(MAIN); ЙPNG  IHDRУ@-╛gIDATxЬc`┤iii№╘0ЗЙРВ ■ддд╝тzJ,b$FQrrЄ| ХЁ    єц═3$╟"Ь>╛>44l ■╜┤ДИ ╚▒XpIГь╧БДДДМММ@>Hь╣сЇ╤╧Я?А>Q2aЦА|дOОE╠╕$._╛№QWWw╨p P╨ЕV▒hkk?╕rх╩ER,"*1└@DDD<0А╪■№IX╜zїBЪX└╧──┤Ф8А┴┘rАk┴·їыq·ТdЛ`Ц Юd А,PB∙№∙│┴Ю={>b╙C0├bа Г·Ь:Бq╪d pqqр╥CЦEЎ@JjY└Ж ┐|∙в├еg>┬АЖ^║■0a-YpdЕ╕ЇрL▐°└╜{ў~╩╩╩о`ff■┤мAMMэ─н[╖Тc╓( з▒¤эмшIENDоB`В