I´m having troubles using the MathCAD API to evaluate functions in a worksheet. Maybe someone here can help me?
I´d like to geht the following to work:
In my MathCAD Worksheet I got: y(x):= 2x
And now I´d like to access this function using the API
MCAppl = new Mathcad.Application();
MCWs = MCAppl.ActiveWorksheet;
And now evaluate the function, for example
y = MCWs.GetValue("y(3)").Real;
But this command is not working for me. I tried different ways of typing it, but no success.
It works the following way:
Define variable x and put y:=2x in MathCAD
y = MCWs.GetValue("y").Real;
But I already got a big document using functions, rewriting the whole document is not an option. So is there any way to evaluate functions using the API? Or is this a bug in Mathcad or its API?
I´d prefer using python for the API, but C# is also an option. Doesn´t seem to much difference between the two when accessing Mathcad. Right now I´m on Mathcad 14.0M20, a short testing on Mathcad 15 did not change anything.
Thanks already for any hints!
Solved! Go to Solution.