Community
Not many here have coded P3D. I would suspect you would do something like the following workflow.
1. prompt the user to select a line
2. get the line's Start and End points
3. add a pipe object using the line's start and end points.
4. modify any pipe properties you want. Maybe prompt the user for input.
5. erase the line.
If you download the Plant 3D SDK you will find an example on how to create a pipeline.
Then using Ed's suggestion, you cycle through your lines and use their end ponits.
Can't find what you're looking for? Ask the community or share your knowledge.