Measure distance between two points

Hi.
I’ve a little problem with a a distance between points (the length of the path).

If points are in a plane, its ok, with a MoveL or MoveC, but I have a external axis moving with a Multimove.

So, there are two points in robot and 2 in the extax.

My question: How i measure the total length?

Thanks

Fabio
Ps: Sorry for my poor english.