The paper presents a fully automatic way to handle the problem of the optimal shakedown design of planar frames. The evaluation of the elastic moments is essential for this design problem and due to the fact that they are design dependent, a classical iterative procedure is followed which updates these moments at the beginning of each iteration. A linear programming problem is then solved inside each iteration. The formulation adopted here is based on the force method which has computational advantages against the displacement method for this type of problems. Within the framework of the force method, the statical basis is provided by an easy to implement algorithm which selects a near minimal mesh basis for any planar graph. This basis is ef®ciently used, in a novel way, to ®nd the¯exibility matrix of the frame in a skyline form amenable to standard algorithms for its decomposition. The quickest way to the ground of each load is used to form the right hand side of the elastic compatibility equations for each load pattern. These equations are ef®-ciently solved by standard back-substitution algorithms and the elastic bending moments to be introduced at the beginning of each iteration is established. Examples of application are also included.