Dear Anders,
Thank you for your query.
I agree with ollikat.
To clarify a bit more:
I am surprised.
Have you looked at the documentation at all?
Just one single little glance?
I would have thought it is very easy and obvious to close the file without saving, and that such an operation should not generate a backup copy.
Do you close without saving?
One overload of the Document.Close method takes a Boolean variable saveModified:
Closes the document with the option to save; saveModified indicates if the current document should be saved before close operation.
Have you set that to false?
Furthermore, if you run your own external command in a model and do not modify anything with it, you should set your transaction mode to read-only:
TransactionMode.ReadOnly:
No transaction (nor group) will be created, and no transaction may be created for the lifetime of the command. The External command may use methods that only read from the model, but not methods that write anything to it. Exceptions will be thrown if the command either tries to start a transaction (or group) or attempts to write to the model.
I hope this helps.
Best regards,
Jeremy