Layout problem is a complex task that involves plenty of aspects of engineering design. A properly designed layout is able to allocate resources reasonably, increase the efficiency of production and operation, and respond to emergencies quickly. There are various levels of layouts, and the plant layout currently attracts the most attention. Previous researches on the plant layout have studied a lot on the facility arrangement manner but not detailed the complete plant layout with special inner structures such as frames or the in-plant pipe rack. Frames were defined in the previous work to allocate facilities into blocks, and they are found to be suitable for the pipe rack design. This paper does the follow-up work to design the in-plant pipe rack on the basis of frames. To reach a more practical result, a detailed plant layout is figured out. The positions of departments including frames and high facilities are optimized in the objective of minimizing the pipeline investment cost and material handling cost of cross-frame connections. Material handling points of these connections are specially concerned and pre-determined on the frames according to the frame internal layout. These points ensure the shortest length of internal connections. With the information above, the in-plant pipe rack can be properly designed. To ensure the practicality, plenty of regulations and considerations are applied. The width, floor number, and pipeline arrangement manner of the pipe rack are obtained. The cost of the pipelines and the pipe rack are both calculated. In the case study, the chemical plant used in the previous work is studied, including four frames, seven high facilities and 90 cross-frame connections. Preceding frame results are used subsequently for the plant optimization and the pipe rack design. Comparisons are made between the optimized and original layouts. As a result, after the optimization, there are 44,442.83 $/y reduction in the pipeline related costs and 621.75 $/y reduction in the pipe rack investment, which proves the effectiveness of the proposed method.