CloseView
The CloseView event notifies the client before a view is closed. A view is equivalent to an Inventor graphics window, so the event fires when a document window is closed. Only _Pre is available.
EventNames:
CloseView_Pre
Examples:
CloseView_Pre:
Register-InventorEvent -EventName CloseView_Pre -Action 'PreCloseView'
function PreCloseView() {
#Write event code here
}