AnsweredAssumed Answered

How to close open documents without saving?

Question asked by Filipe Venceslau on Nov 8, 2010
Latest reply on Dec 7, 2010 by Samu Niveri

I can't seem to get solidworks to close documents without asking user to save changes.

I've set UserControl to True, even tried running with UserControlBackground, but everytime I close a document that is "dirty", solidworks prompts user to save.

This happens mostly with drawings.

 

Here's my code...

 

 

        If Not myApp Is Nothing Then
            'closes all documents in memory without saving
            For Each OpenDoc As ModelDoc2 In myApp.GetDocuments
                myApp.QuitDoc(OpenDoc.GetTitle)
            Next
        End If

 

 

In the API help, it clearly says...to use QuitDoc Method (ISldWorks)...and that it should close without saving...so why am I getting a dialog prompt to save?

 

Note: I'm not creating a solidworks instance, I'm just getting the current open one...would that make any difference?

 

Thanks

Outcomes