In C#, how to exit dwg files without having to choose whether to save it?

Hi everyone. I am writing a c# plugin to automatically extract some specific information from a list of dwg files, and I can’t find a way to supress the “do you want to save” dialog.

Someone asked similar questions before, but the link for solution sample file that @Dale kindly offered is 404 page not found now. It would be a great help if anyone knows how to do it. :pray:

Can you point me to that link?

– Dale

@dale Thanks for your reply!!
The 404 page not found link:

The discussion i saw those links:

Hi @1912351430,

Those samples have been moved to the developer samples repository on GitHub.

– Dale

@dale Thanks! The first link seems promising.:heart:

If using RhinoCommon, set this property to false and Rhino won’t prompt you to save.

– Dale

@dale I tried doc.Modified = false, but it still asked me to save the dwg file as 3dm(not in a dialog though). I guess it is because it’s a dwg file I am openning not a 3dm file?