Duplicating UserData of different plugin

I know that access to UserData gains only plugin which contains its own implementation, but I’m rather interested if I can copy all existing UserData even from different plugins to different RhinoObject?

Something like:

rhObjB.Attributes = rhObjA.Attributes.Duplicate();

Above isn’t working in my case. Any ideas?

I guess nobody knows - @dale ?

Oh @menno maybe you know something about it ?

I don’t think that is possible, because a UserData object can contain its own duplication routines in the plug-in it belongs to.

As i thought. I guess duplicating and modification of underlying stuff will be more “secure” :wink:

@menno moving attributes worked i actualy serialized them and deserialized and also made silly mistake - forgot to do CommitChanges() on object :sweat_smile:

However different thing found. I wanted to swap RhinoObject geometry but it hasn’t worked - In particular RhinoObject, where Geometry is Mesh i took it assigned different mesh but even with CommitChanges, didn’t work - again made sth silly meanwhile ?

Oh i forgot already… Needed to Clear Verts and Faces and add them from second one as Geometry is only a getter :wink:

Ok this one will be hard - @dale is it possible to merge two objects UserData?

Not that I know of.

Why do you need to do this?

– Dale

I need to merge multiple engines proxy pointers into one RhObj and few of those use UserData to keep this. I wonder if i could make use of UnknownUserData somehow.

If you own these ‘proxy pointers’ then you’re can merge all you want. If you don’t own the data, then there isn’t much hope.

– Dale