I will appreciate any help or direction or my issue described below.
So basically I was able to obtain the start/send point of pipe segments. Then I am inserting a family by first point and the rotation of the pipe segments.
As you can see in the screen capture, it works well on the two bottom pipe layouts. But the strange think is that, on the upper two layouts, some of the placed families have the wrong rotation angle.
Thanks for your help.