Creating discrete-event simulation models for adaptable material flow systems is challenging due to the need for various structural variants. This paper unveils an innovative method to automate this process, illustrated by a case study, which makes it easier and more efficient.