Hi,
As you wrote in your post, the problem is that those two procedures -SoftPolyEdgeElements and fileCmdCallback- are not defined.
So, why they are not defined and how you could know that?
The first step is: check what exactly you are trying to call.
running this MEL code, you'll get what SaveScene is.
whatIs SaveScene;
// Result: Run Time Command //
https://help.autodesk.com/cloudhelp/2020/ENU/Maya-Tech-Docs/Commands/whatIs.html
The result is: Run Time Command. Well... it does not seems to help so much.
But you can call another piece of code that will show you what this run time command is.
runTimeCommand -query -command SaveScene;
// Result: fileCmdCallback; FileMenu_SaveItem; fileCmdRestoreCallback; //
https://help.autodesk.com/cloudhelp/2020/ENU/Maya-Tech-Docs/Commands/runTimeCommand.html
And now, we know what the run time command is. It is a command that executes three other procedures.
fileCmdCallback, FileMenu_SaveItem and fileCmdRestoreCallback.
And if you remember your error, it says:
Error: Line 1: Cannot find procedure "fileCmdCallback".
So, naturally, you should think: "I must know what fileCmdCallback is".
The steps are similar. Before aniything, call whatIs.
whatIs fileCmdCallback;
// Result: Mel procedure found in: C:/Program Files/Autodesk/Maya2020/scripts/startup/initAfter.mel //
And now, you see that fileCmdCallback is a procedure defined in some MEL file.
You can check in that path and see yourself how things are written.
If you open the file, in the very beginning of it, you'll see its definition, which says:
// Description:
// This script is called after file open/new on startup to make
// sure that the UI construction went okay, and if not to clean up.
I'll not dive deep to explain every detail, but you can see that this MEL is trying to create/check UI.
So, this code is for an "normal manually launched Maya with UI" and should not work with a batch instance.
You should use file command, instead of the SaveScene command.
The same happens in the PolygonSoftenEdge command.
If you check the files and all the procedures inside, you'll see that it also requires an UI.
You should opt for using something like PolySoftEdge command instead.
Hope it helps