If you have access to a spreadsheet like EXCEL, use the following steps:
1.Draw your design line.
2. In the Design Line Dialog, Select View then select Calculate Pressure Drop. Change the settings to only use Section and Length. Section is needed to ensure uniqueness of each section in the event more than one section has the same length.Erase the blank and header row.
3. Select the Export Data located at the lower left corner of the dialog box. Your text editor should appear with all of the sections and length data. Save the text file.
4. Open EXCEL and import the text file data into a formatted table (later editions of EXCEL). Be sure to check the Total Row checkbox located in the Design Tab.
5. In the Design Tab select Remove Duplicates to eliminate all duplicates from the table (this is why the Section column is needed).
6. Read the total length from the bottom row.
If you need a breakout for different pipe sizes, add the Eff. Diam. column.
The advantage of this method is no copy/paste/explode/lisp is required, the data is retained in a file, and EXCEL operations could be handled using a VBA routine.
Here is a link to a short video (no audio) showing this method.
https://youtu.be/9QvxL2bvGRk