AnsweredAssumed Answered

API - Close active doc and don't save

Question asked by Michael Caulton on Sep 11, 2017
Latest reply on Sep 12, 2017 by Michael Caulton

I have an assembly open that I need to activate several of the parts, then hide some stuff int he part, then save as JPG and close the part and not save changes.

 

My current method is to use:

  • swApp.IGetOpenDocumentByName2(Name) to get the new part model data from its name in the assmebly
  • swApp.ActivateDoc2(swModel.GetTitle, True, Nothing) to activate the doc
  • swApp.QuitDoc(swModel.GetTitle) or swApp.CloseDoc(swModel.GetTitle) to close the doc that was activated

 

The problem I have is that a "Save Modified Documents" dialog sometime shows. Image attached.

 

The dialog does not show for every part.

 

Is there a way make this not show and for the changes to be discarded? ie activate read only or closedoc and not save

Attachments

Outcomes