Recently, the shipbuilding industry has been able to develop new production methods. This new method promotes design automation in order to produce ships more efficiently. Engine room design, including the piping system, is a complex process especially in the pipe routing problem. This process requires a considerable number of man hours. This paper presents a new approach for optimization of pipe routing system. The Dijkstra's algorithm is used to obtain short path by considering some constraints like number of pipe bends and pipe cross. The method works by generating some candidate paths based on the given parameters geometrically. The non-geometric parameters such as material cost and installation cost will also be assessed. Then by using the algorithm, the desire option from various candidate paths will be evaluated. This study discusses the details of the above methods. In addition, simulation test of a several piping systems were conducted to show the pipe routing design procedure in detail and to verify the effectiveness of the proposed methodology.