Getting Line Geometry of a Cable Tray Run

Hey all, I’m new to contributing to the forum, even though I have been working with dynamo for about a year now as used this forum to solve many past issues. These past couple days I find myself stumped with a problem. I’m looking to get the line geometry of a cable tray run. I can easily get the geometry of the cable tray length itself, but I’m hoping to create a line using the entire run length which includes the fittings. If we can’t do it with a cable tray system is there a way to do it with ductwork system? Thanks.