Optimizing mechatronic components is of increasing importance, e.g. for minimizing energy consumption and the use of rare materials. MagOpt is a modular software tool for the simulation and optimization of mechatronic components. Parametric design optimization can be carried out with various different optimization strategies like gradient-based methods or multi-objective evolutionary or genetic algorithms. MagOpt features a flexible structure for the storage of complex data and an open and modular interface to existing third-party programs. One such third-party program which can be used by MagOpt for the optimization of mechanic components is the multi-body software HOTINT. This article describes MagOpt and how it was coupled with HOTINT to optimize a rotor geometry.