Skip to main content
1-Visitor
December 17, 2012
Solved

Extracting Data from MathCAD using VB.net

  • December 17, 2012
  • 4 replies
  • 3650 views

Hi,

  1. Trying to extract/ pass data to MathCAD 15.0 using Vb.Net (VB 2010- Dotnet Framwork 4.0).
  2. We are trying to pass 2 values (“A”, & “B”) from Vb.Net to MathCAD and then performing a simple calculation of (C=A+B) in MathCAD and extracting the value of “C” from MathCAD back to Vb.Net.
  3. The project was developed as per the documentation available; but there seems to be minor issue in reading data from MathCAD.
  4. Sample project and test MathCAD attached.

We will be thankful if someone can respond to our query.

Thanks

Best answer by ViacheslavMezen

It should be done like this.

VBNet Mathcad test example.PNG

You have to forget everything you know about VB6, and use .Net style.

4 replies

1-Visitor
December 17, 2012

It should be done like this.

VBNet Mathcad test example.PNG

You have to forget everything you know about VB6, and use .Net style.

1-Visitor
December 18, 2012

Hello Viacheslav,

Many thanks for your prompt response.

The solution works just fine. Just one feedback ...

I was getting following error while I tried changing the values of A & B few times.

"The requested value was not found in the worksheet."

Not sure what the issue is.

Thanks again.

Surya

1-Visitor
August 23, 2017

Hello,

 

i dont know if anyone will respond but i would be very happy if anyone could ^^

 

I downloaded Visual Basic 2010 and to be honest i am not a progammer. I wanted to do quiet the same and it doesnt looks too complicated. I want to sent a value into my sheet and get the result exactly like in the example above. But when i open the file and start VB it is telling me that myA or myB has an "system.nullreferenceexception in my Mathcad.exe..." and is not calculating. 

How can i solve this? After i would just adjust it to my sheet (well this is my idea ^^) 

 

maybe someone can help if it is not too complicated. 

greeting