I applied a user data to an object. And want that the user data is copied at the same time for the newly object.
I catch the duplicate Events. But for different reason I would like to be sure It ti the Copy paste shortcut the user have pressed, I am exactly in the same situation as in this thread. The User Data doesn t go into the " protected override void OnDuplicate(Rhino.DocObjects.Custom.UserData source) -Write(…) " function. Is there someone who can give a good sample ?
A copy paste (short cut) serializes the data.
You need to handle the read write method for saving to 3dm files in your plugin class.
WriteDocument & ReadDocument methods must be overridden.
I believe that the event is OnEndOpenDocument and the DocumentOpenEventArgs can tell you if it is a merge(paste) or actually opening a file.
I catch these and handle them in the idle event.