Execute plugin before closing file

Hello everyone,
I would like to know if its posible to execute a plugin when exit button is pressed, like when a plugin is execute when a file is opened.

Thanks in advance,
Jose Verdu

If this is a developer question then below example file provides a way to use event “when closing Rhino”, “when closing document” etc, for plugin you are developing.

example:

1 Like

Thank you very much.