Assume Mecway model is Test1.liml.
In this model I set GUI "Analysis\Save after solve" to Test1.liml.
I then run from the command line (actually part of a batch file) --
Mecway.exe Test1.liml solve
This gives the results in Test1.liml (after reloading Test1.liml).
Now assume I save Test1.liml as Test2.liml and make some changes. However, also assume that I forgot to change "Analysis\Save after solve" so that it is still set as Test1.liml.
Now I solve Test2.liml from the command line --
Mecway.exe Test2.liml solve
The results of Test2.liml have now overwritten the previous Test1.liml results because of my error.
Are either of the following possible?
1. Set "Analysis\Save after solve" to automatically refer to the current GUI liml file rather than having to manually specify the file for each model.
2. With a proper switch, the command line solve would output results to the file that is being solved (Test2.liml in the above example) rather than anything specified by "Analysis\Save after solve" in the GUI.
Other suggestions if above aren't possible?
Mecway 16, Windows 10
Thanks,
Don C.
Comments
<f>.liml
instead of
Test1.liml
Works well.
In the meantime I did think of an alternate solution (not so elegant can be used for Mecway before v. 16) --
For all GUI models, set "Analysis\Save after solve" to Dummy.liml (or some equally generic name that will be used in the batch file).
In the Mecway_solve.bat file --
Mecway.exe %1 solve
delete %1
:: Avoids having to confirm the copy-overwrite command (next).
copy Dummy.liml %1
The batch file would be called like --
Mecway_solve.bat Test1.liml
John --
Can you post your script (for reference)?
Solve then Save:
mw.solve()
mw.save()
Use:
"C:\Program Files\Mecway\Mecway16\mecway.exe" aaa.liml script solve_then_save.py
you can refer to a path if the python script is stored elsewhere