ACAD Lines to Pipe

I’m having an issue with this script not converting CAD Lines to Revit Pipe. It seems the Curve.Element is what’s causing it, but I’m new to Dynamo, so know knows. Thanks.

Can you reload the images at a higher resolution? I cannot make out the nodes being used.