Swept Length Calculator for an Assembly instead of individual parts

Can you advise if you have a macro like this that will work on an assembly level.   ideally I would like to isolate the piping that I am working on and get a total length of the multiple parts that I have isolated.  Can the macro that works for the part level be easily modified?   I am not very familiar with macro so that may not be an easy task.  Thank you.

SolidworksApi/macros