Unable to close mimics through scripting


I am working on an automation script that should open a Mimics project, perform some changes and then close Mimics again.
According to the documentation there should be the option to exit the application using:
However, when I try this I get the following error:

[12:49:30] Error: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'mimics.file' has no attribute 'exit'

Any idea what I might be doing wrong?
This was for MIS 21, I have not yet tested it on the latest version.

Hi Thijs,

I can confirm that mimics.file.exit() works in MIS 24. It is possible that this function didn’t exist yet in MIS 21 or that it was named differently. Do you have the possibility to upgrade to the newest version or are you required to work in MIS 21?

Kind regards,


Hey Marnic,

Thanks for the quick reply. I am working on getting the update to MIS 24, but I am not sure if I’ll be able to update soon.
The scripting documentation of MIS 21 does contain a reference to mimics.file.exit(). So I find it strange that it does not actually seem to exist when try to run it.

Hey Thijs,

I’ve just ran the command of mimics.file.exit() in Mimics 21 and it worked for me. It might be best to contact your local sales team (application engineer) so we can investigate it a bit more.

Kind regards,


Hi Marnic,

I got in touch with one of the application engineers and he was able to replicate the issue. I’m still not sure why in some scenario’s it doesn’t work with MIS 21, but I was able to test it out with MIS 24 and that seemed to resolve the issue.