After more doc reading and testing, I think there is simply no any maya function that handle a node duplication, so we have to make our own.
if that interest anybody, here is the process done rougly :
MFnDependencyNode originalNode(originalNodeMObject);
MObject newNode = MDagModifierHandler::GetDag()->createNode(originalNode.type());
for(int i = 0; i < originalNode.attributeCount(); i++)
{
MObject oldAttr = originalNode.attribute(i);
MFnAttribute MfnOldAttr(oldAttr);
MPlug oriPlug;
MPlug newPlug;
//These 2 function are personnalised helper that simply return MPlug based on the inputed node and plug name
GetPlug(node->thisMObject(), MfnOldAttr.name(), &oriPlug);
GetPlug(newNode, MfnOldAttr.name(), &newPlug);
MDataHandle oriVal(oriPlug.asMDataHandle());
MDataHandle newVal(newPlug.asMDataHandle());
MStatus stat = newVal.copy(oriVal);
newPlug.setMDataHandle(newVal);
oriPlug.destructHandle(oriVal);
newPlug.destructHandle(newVal);
}
this code is ofc incomplete, do not handle dynamic attribute, and do not duplicate connection.
if someone have a better way of doing this, i’ll be happy to hear about it !