Community Tip - You can change your system assigned username to something more personal in your community settings. X
I have 15 executable MathCad Prime 8 calculations that I’d like to run from a Windows Command batch file. How do I do this?
@LP_12590548 wrote:
I have 15 executable MathCad Prime 8 calculations that I’d like to run from a Windows Command batch file. How do I do this?
What does you mean by “executable” Mathcad Prime 8 calculations? For example, do you mean that you have 15 worksheets that you like to run from a batch file? Or do you mean something else’s?
Putting aside your question for a while, what is your particular reason for wanting to run Mathcad calculations from a Windows batch file? What does this do for you that running the calculations within Mathcad does not?
Stuart
If you wish to pursue the batch file route, you can create a batch file of the form.
"MathadPath\MathcadPrime.exe" "Worksheet Path\File 1.mcdx"
"MathadPath\MathcadPrime.exe" "Worksheet Path\File 2.mcdx"
...
"MathadPath\MathcadPrime.exe" "Worksheet Path\File 15.mcdx"
In my setup, MathadPath is C:\Program Files\PTC\Mathcad Prime 10.0.1.0.
I've tested the method using a couple of worksheets.
Stuart
Hi,
Using the command line just opens the worksheet.
I suggest using the PTC Prime API as you can open, close, calculate, and exchange data into and out of Prime. See help for examples.
@terryhendicott wrote:
Hi,
Using the command line just opens the worksheet.
I suggest using the PTC Prime API as you can open, close, calculate, and exchange data into and out of Prime. See help for examples.
True. I had forgotten that worksheets don't recalculate even if the Auto-Calculate option is selected.
It's a shame that the OP has Mathcad Prime 8 and not Mathcad Prime 10, otherwise the OP might have been able to write a Mathcad worksheet that used an Advanced Control to access the API to open and calculate a "batch" of other Mathcad worksheets.
Stuart