Unable to override pasteFromClipboard() method

In our application we are trying to override the pasteFromClipboard() method and change the newly copied parts before pasting them to canvas (changing the key, name and location). Please let us know how to override this method.

Also can we override copyParts() method if so is there any example for that ?

First, have you read http://gojs.net/latest/intro/extensions.html ?

If you are overriding CommandHandler.pasteFromClipboard, I would think you would want to override CommandHandler.copyToClipboard, not Diagram.copyParts. But perhaps you want to set Model.copyNodeDataFunction instead, in order to customize the copying process.