We consider the context of machining systems design where both equipment selection and line balancing decisions have to be taken in order to minimise the total cost of the system. The designed flow line employs multi-positional machines with rotary tables where vertical and horizontal machining modules can be used for the realisation of machining processes. For this challenging optimisation problem in production research, we develop an innovative mathematical model based on a mixed-integer linear programme and a heuristic algorithm for an approximate solution. An extensive numerical experiment is conducted in order to evaluate the performances of the proposed mathematical model and the developed heuristic. The obtained results show that the decision makers can use the elaborated methods for solving efficiently even large-scale industrial problems.