English Translation:
I have sub-components in the assembly environment.
When I do a lot of work, I have parts other than assembly parts in my workspace, so I delete them separately.
It leaves only the scanner sub-parts where I want to have unnecessary files in the workspace, VBA or iLogic that I can delete.
But I'm not familiar with this part.
Answer:
Although this is not the full solution, I hope you can find these two post useful.
You could loop through the main assembly and check the filepath and if it doesn’t match the folder path delete those. You could also just move them to a folder called obsolete in case you need to recover the old version.
Here is a link to a post to look at a folder and loop through the files and delete those under a certain condition. See message 5 in link below
https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-rule-for-deleting-or-replacing-f...
Here is a post to work with the assembly, you can use the all referenced document rule and get the full file path
https://modthemachine.typepad.com/my_weblog/2009/03/accessing-assembly-components.html
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan