Hi Ingo,
Did you try to record the script? Try recording the moving of objects to a new layer and then you can modify it to fit your needs by checking names.
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/spaceclaim/Discovery/user_manual/recording_overview.html
-Aniket
How to access Ansys help links
Guidelines for Posting on Ansys Learning Forum