Arc Length Script

Does anyone have a script that returns the length of a MoveC? I could take the distance between start and via and add this to the distance between the via and the end, but this won’t be exact. I don’t think there’s a built-in function for this, but if I’ve missed it, I’d appreciate if someone could point it out. Otherwise I’ll try writing one myself.