There are still discrepancies between your descriptions and the sample drawing.
You describe Breaking the SIVA lines, but in "after," the KIRIS lines [which are continuous in "before"] are also Broken at every intersection. Should they not be Broken, or do you really want all lines on both Layers Broken?
I would assume "these broken lines" that are to be moved to Layer 0 are all the lines that were Broken, but in "after," those on the KIRIS Layer are not moved to Layer 0. [If they should not have been Broken at all, that answers this issue.]
You describe in one Message that the Text needs to be "created," but it is already there in "before," with zeros for all the numerical parts. Should it not be in "before"? If it should be there already, it would only be edited, not created.
The Text content in "after" does reflect the total length of all SIVA lines that are near that Text inside the KIRIS "box," but where is the 2.88 multiplier coming from? I can't find anything with that kind of length or size. [The SIVA Layer has a non-zero lineweight, but it's not 2.88, and if lines on it go to Layer 0, they lose that anyway.] If 2.88 is a constant, and if the Text is really already there, should the 2.88 be built into the appropriate place in the Text, rather than starting as zero? If 2.88 is not a constant, then a routine would need some basis for it to use in the multiplication. Should the routine ask the User? Can it be calculated from I-don't-knw-what in the drawing or the selected objects? Is it a variable that would already be established?
Unrelated to the discrepancies:
The "before" text has two decimal places in all numbers, but in "after," the area numbers [not the lengths or the multiplier] are to only one decimal place. Which should they be?
If the Text is to be created, what are the criteria for its Style and height and location? Would they be constant, or should the User be asked? Could the height be calculated relative to something, like the drawing's plotting scale?
Is it your intent that all these lines should be selected together? If so, how is a routine to know that [in your sample drawing] there should be two calculations done and which of the lines go together into those two, rather than that they are all to be processed as one group?
Kent Cooper, AIA