How to get length of a link?

How to get length of a link?

Our code
var diagram_data = myDiagram.model.toJson();
diagram_data = JSON.parse(diagram_data );
var linkdataarr = diagram_data .linkDataArray;

We want fetch each pipe length.
How to get length of pipes?

Almost no question should have an answer that writes out a whole model in textual form and then parses it just to look at one property.

The link route is available as the Link.points property value, which will be a List of Points in document coordinates. If your link is not a Bezier curve, then a good approximation of the length will be the sum of the distances between the consecutive points in the route.