I can imagine an approach, at least:
Select a VIEW Block, or select them all and apply what follows to each.
Given the plain rectangular shape and orthogonal orientation of it, using its bounding box, draw a temporary Polyline rectangle over its boundary.
Using its opposite corners for a Crossing window, find all Polylines within or crossing it.
Using the same for a Window [not Crossing] window, find all the BLK_COUNT Blocks inside it.
Using the (intersectwith) method, find the intersections between the Polyline(s) and the VIEW Block boundary.
If there are 2 intersections of the same Polyline, find the distances along that at each intersection with (vlax-curve-getDistAtPoint) , and from those calculate the length along the Polyline inside. [There should be no need to Break the Polyline.]
If there are 2 Polylines with 1 intersection of each with the boundary:
Determine whether the end of each Polyline that's inside is its start or its end;
Calculate the distances of each portion from that end to its intersection with the boundary;
Add the distances for a total length.
Delete the temporary rectangle.
Use (setpropertyvalue) to put the appropriate values [converted to Text strings] into the appropriate Attributes.
Potential complications:
If a BLK_COUNT Block straddles the boundary between two VIEW Blocks [for example, one between 001 & 002], it will not be seen by a Window selection for either VIEW Block. But it would be seen by Crossing selections for both VIEW Blocks. Maybe it should be done by Crossing, so that all are seen, and every BLK_COUNT Block checked for which VIEW Block it should be credited to. But that check would logically be for whether its insertion point is inside. Unfortunately, the BLK_COUNT insertion point is not in the middle. That one that straddles 001 & 002 has its insertion point inside 001, but more of itself inside 002. And the one just to its right is fully [in extents and insertion point] inside 001, but the Polyline path near it is inside 002, if the location along the path is what matters -- it would not be seen by either variety of window in selection for 002. How should those be assigned?
Could there ever be more than two Polylines associated with a given VIEW Block? [I don't see any like that in the sample drawing, but....]
Could the VIEW Blocks ever be at some non-orthogonal rotation?
Would a Polyline ever exit a VIEW Block boundary and then come back inside before exiting again? [That very nearly happens between 001 & 002.] That would greatly complicate what I'm picturing.
Also:
There are at least 3 places where the Polylines go entirely outside of any VIEW Block. This approach would not see the lengths of those bits. You would presumably need to check for that yourself and shift VIEW Blocks to "catch" all of the lengths of all Polylines.
In 056 [and maybe also elsewhere], there's a little loop in the Polyline path. The length of that loop would be included. If it's just a graphic representation, and not of "real" size or shape, would that throw off your results to a meaningful degree?
Kent Cooper, AIA