Automatically placing pipe fittings or valves on piperun

Is it possible to automatically place pipe fittings (i.e. elbow or tee) or valves on a piperun (alignment or polyline)?
In the condition that the coordinates of pipe fittings are acquired.