Prevent object cloning ?

Prevent object cloning ?

Anonymous
Not applicable
399 Views
2 Replies
Message 1 of 3

Prevent object cloning ?

Anonymous
Not applicable
Hi all,

I have a helper that attaches itself to an object. I don't want to the user to be able to clone it for various reasons. Is there a way to achieve this ?

Even by hooking on the preNodesCloned callback, there is no way to cancel the operation from what i've found...

Thanks !
0 Likes
400 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Pretty old post but I need to know this as well and can't find anything online, in samples, etc.

 

I do not want to allow a custom object created procedurally to be cloned (shift+drag) or copy/pasted. 

0 Likes
Message 3 of 3

denisT.MaxDoctor
Advisor
Advisor

first of you have know that there is NO way to prevent a cloning of the node! the best you can do is to catch the fact that any specified node was cloned.

 

You can use postNodesCloned general callback which is coming with pairs of source and target nodes after they were cloned. Using this callback you can collect all unwanted "clones", and for example give a warning after that with an option to delete these "clones".

 

But a simple deleting of some "clones" might be not safe, in case where the cloning was happen as a part of "hierarchy cloning" process.  

 

Using SDK you can make you own class Object which will prevent cloning. But as I said it's possible by using SDK only.