C# Duplicate Component

Anybody knows if is there a way to duplicate a GH_Component (or a IGH_DocumentObject) from code?
Like copy/paste within the GH Canvas.

Thanks

There is no duplication as such. You have to serialise, then deserialise it. The GH_DocumentIO class has some handy methods for doing this in memory.

Thanks, working fine!

Hi @Harper can you elaborate how you solved it please?

Hi, how do you obtain it?
Thank you