I have looked at beatslaughters mixer snapshots plugin and he seems to paste a device by inserting it (which there is a function for) and then setting all values with a loop. It would be cool if it was possible to insert xml data directly.
I’m not inserting any devices at all but work with existing devices only. Snapshots.lua contains all the necessary stuff to copy the values to another track and could be used in your projects. The file contains several classes managing lists working down in levels sort of: Snapshots (snapshot list) -> Snapshot (track list) -> Track (devices list) -> Device (parameter list). Any of those classes have own insert and restore functions, so in theory the snapshots tool is prepared to even restore single tracks and devices out of several snapshots already. Each class doesn’t depend on it’s parent, but it’s child. All you need to do is strip the file down a bit from unneccessary code, snapshots class isn’t needed to manage snapshots, notifiers and option stuff can be thrown out, ignored track and device classes too.