OnQuit but after save and/or check-in?

OnQuit but after save and/or check-in?

tfrohe_LSI
Advocate Advocate
268 Views
1 Reply
Message 1 of 2

OnQuit but after save and/or check-in?

tfrohe_LSI
Advocate
Advocate

In my add-in, I am using the OnQuit event to do some "stuff" before Inventor shuts down. It works fine but I really would like to wait until after all documents have been saved and/or checked-in to Vault before doing said "stuff." Anyone have an idea about how to accomplish this? Thank you.

0 Likes
269 Views
1 Reply
Reply (1)
Message 2 of 2

tfrohe_LSI
Advocate
Advocate

Some clarification since I can not edit my original post. Here is my base code for the event. This fires before prompts for saving and before prompts to check in. 

 

Private Sub ApplicationEvents_OnQuit(BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles ApplicationEvents.OnQuit

            If BeforeOrAfter = EventTimingEnum.kBefore Then
                If g_inventorApplication.Documents.VisibleDocuments.Count > 0 Then
                    'Do some stuff here
                Else
                    'Do some other stuff
                End If
            End If

        End Sub

 

If a user has checked in a file and has enabled the setting to remove local copies, it will affect the final VisibleDocuments collection. I would therefore like to wait to do my stuff with VisibleDocuments until after all check-ins have taken place.

 

0 Likes