Pipe Network to Polylines with Object Data

if no off-the-shelf solution suffits you may use something like in this post: How to create shapefile from Dynamo

Basically you have to dress up your shapefile and input and then return the points for geometry for the shape writer.