Find Total Length of Sketch Segments in Sketch

I an not an expert of program coding or whatnot...

Finding the total length of segments in a sketch is the main task I would like to do without having to measure and record bit by bit.

Find Total Length of Sketch Segments in Sketch Example (VBA)

This seems to be the solution but I don't understand what it is...

Please help me understand that link step by step if possible.

SolidworksApi macros