Stretchbending enables to bend L-profiles with mortise and tenon joints for hulls and vaulted roofs. In contrast to hulls, the orientation of the panels for roofs is flexible. The optimal starting position and orientation of the panels is characterized by a minimum bending curvature of each panel. In this thesis the optimization process is automated by the use of a CATIA V5 Macro, which calculates the optimum of any surface geometry. Furthermore, the calculated panels are split to achieve the transport length and the defined parameters of the bending machine. Finally, the surface-elements get unfold and measured according to the setup parameters of the machine. These specific values are exported to a .csv file.