Do you mean 'Morph' rather than 'Mesh'?
Mesh doesn't have hard, hidden and soft options but a morph does.
The problem with a morph is it becomes native VERT, EDGE, PGON.
Create a simple morph and duplicate it 2 times (so you have 3).
Leave one as it is (hard edges).
Change the second to soft edges and the third to hidden edges.
Save as objects and look for differences in the code.
You will see a difference in the status code of the EDGE.
This is not the full answer (I would have to research more to be able to give more help) but this is where you need to look.
Adding a parameter to replace this edge is what you will need to do.
The hard part will be trying to find the correct edge in a complex morph - there can be thousands.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11