Mathcad automation: passing a variable to Mathcad
Mathcad automation: passing a variable to Mathcad
(OP)
Hi all,
I am building an application in VB.NET that calls a mathcad worksheet to solve a set of equations. Based on the example in the Developper's Reference I used the SetValue and GetValue command to handle the inputs and outputs. Now, it actually works fine, as long as the inputs are integers. Whenever I try to input a float nothing happens. I've tried to passe a float number as string using both "." and "," as decimal separator and I've tried to pass the value as Double too. Anyone has an idea of how to solve this problem?
Thanks!
Raphael
I am building an application in VB.NET that calls a mathcad worksheet to solve a set of equations. Based on the example in the Developper's Reference I used the SetValue and GetValue command to handle the inputs and outputs. Now, it actually works fine, as long as the inputs are integers. Whenever I try to input a float nothing happens. I've tried to passe a float number as string using both "." and "," as decimal separator and I've tried to pass the value as Double too. Anyone has an idea of how to solve this problem?
Thanks!
Raphael





RE: Mathcad automation: passing a variable to Mathcad
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Mathcad automation: passing a variable to Mathcad
What I've found is that when you use SetValue it sets the value at the top of the sheet, if you then define that variable anywhere in the sheet this overrides the SetValue method from the point where it is redefined.
What I have decided to do and is much more successful is to edit the xml instead.
The only problem with this method is speed, you have to edit the xml file, save it, then open MathCAD and then open the file.
Obviously it also has to be release 13 and after for there to be an xml file to edit.
RE: Mathcad automation: passing a variable to Mathcad
RE: Mathcad automation: passing a variable to Mathcad
Fixed!
Raphaƫl