Currently i'm writting a script to calculate the surface length and 3D length (mean that the straight line length from begin vertex to the end vertex, mean that the length which has Z value apply, in math we can calculate by function in this topic: 3D Coordinate Geometry - Distance | Brilliant Math & Science Wiki
At first i used th SurfaceLength_3d function to get surface length then i use the Intersect function which will produce the 3D_length in attribute table for 3D length but 3D length and surface length are equal for every case so i think that 3d length is the Surface length in this case
Do we have any function to get the 3D straight line length of polyline in Arcgis?
use add-geometry-attributes for 3D length of a Z-enabled polyline. If you just want the straightline length between the start and the end, simply use the X,Y and Z values for the start and end for this calculation.