For an Animation Path object named Path 1, use the following syntax:
var pathLength = Path_1.GetTotalLength()