Max for Live - method to add/swap a sample file in a simpler device?

J B's icon

Hi all, is there a method to hotswap/add a sample to a simpler device?

I’ve written a JS function to locate and get the path of a simpler device on a track, but can’t find a method to drop a sample into the device using the files path in the LOM.

I see that there is a file_path property for a sample in a simpler device in the LOM, but this property is read only.

Does such a method exist to update/swap the sample file in a simpler or to do the action of dropping a sample file onto a midi track or drum pad?

Regards,

Jon