how to calculate the sum of the lenght of selected parts in an assembly

Hi,

 

I am building a large assembly of a few hundreds of assemblies/sub-assemblies and individual solid parts. I am using SolidWorks 2018.

I am designing a piping system. I would like to get the sum of the lenght of all pipes in the system that I select. The pipes have different lengths, and, as such, also different names.

Thank you

Best regards,

SolidworksGeneral