For these kind of jobs, I would recommend you to complement your work with Rhino + Grasshopper.
You could create the extrusion/lines there, send it over as a morph with the live connection add-on, which already has the length stored as a property. The advantage would be, that you can create any kind of math in there.
Unfortunately I don't know an easy way natively in ARCHICAD, other than manually calculating the length.
You could use GDL, but judging by your screenshots, it wouldn't really worth the effort in my opinion.
I hope this helps.
odv.hu | actively using: AC25-26 INT | Rhino7-WIP | macOS @ apple silicon / win10 x64