I came across a Revit question on the autodesk froum where i am experiencing the exact same problem as the previous user:
In it there is mention of using Dyanmo to determine the length which i am also unfamiliar with but want to use it to find a solution. When i create the script shown by @Alfredo Medina I am getting a blank document at the other end and something is wrong. Could someone go into a little more detail please of the steps required and explain where I may be going wrong. I would like it to output the information as a schedule for all of the different sizes.
I have also put this question on the revit forum with files attached if you wiah to download them as i cannot do it here: