I’m doing some research to save my custom plugin data before Rhino saves the 3dm file and I noticed that the event BeginSaveDocument and some overrided methods are being fired 2 times when doing a CopyToClipboard (CTRL + C) command and only 1 time when calling a SaveAs command. Here’s my command line output putting a Writeline into each event/override:
Since CopyToClipboard causes temporary files to be written, it also calls the WriteDocument method in my plug-in. Is there a way to know that WriteDocument is being called from CopyToClipboard vs say a Save As… Rhino 5 file? The only write options I see that appear to be different from a normal call are that IncludeHistory and IncludePreviewImage are false but I assume that is not a reliable way. The reason I ask is because I would like to do something different in the two cases.