×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Mathcad automation: passing a variable to Mathcad

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

RE: Mathcad automation: passing a variable to Mathcad

I had real problems with mathcad and .net

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

(OP)
Thanks for the tip Fawkes. if I can't get it to work the way I want I'll probably try to edit the XML file. I hope I won't need to though as I'm merely trying to use the automation features as they are intended to be used! I've posted in the Mathcad Collaboratory as suggested by IRstuff. Otherwise any help is appreciated. I'm working with Mathcad 13 by the way.

RE: Mathcad automation: passing a variable to Mathcad

(OP)
Finally the issue has been resolved. The problem was that in my regional settings the comma was used as decimal separator, but couldn't be interpreted by Mathcad.

Fixed!

Raphaƫl

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources