Skip to main content
1-Visitor
May 12, 2014
Question

How to save table data from Mathcad 15.0 (M010) to a text file ?

  • May 12, 2014
  • 4 replies
  • 5043 views

I want to create a table and assign the different variables to each cell. After the solving the values, Save the table to text file. How can do it ??

4 replies

25-Diamond I
May 12, 2014

And whats wrong about WRITEPRN ??

Of course you would have to use it after you created your table.

17-Peridot
May 12, 2014

Hello Suresh,

somewhere on this website there is a compendium of neat little programs. It is called "Useful extra components". From that sheet I've got this little helper (see attached file) that writes out data to a text file only on demand.

Hope this helps

Raiko

1-Visitor
May 12, 2014

Yes i can use WRITEPRN..

But the text file format will be as shown

// Datafile written by Mathcad
// 05/12/14 10:37:22

.MATRIX 0 0 8 3
"FileName" "abc.prt" "STRING" "DrawingName" "abc.drw" "STRING" "Height" 80.56

Finally I am creating a vb.net application with good UI, which takes file path as input and writes all parameters to text file as needed. In this case i need to list all the parameters names to get its values

25-Diamond I
May 12, 2014

I am not sure from your description what you think you need. Is the problem the import in Mathcad or the export?

In this case i need to list all the parameters names to get its values

As far as i know there is no way to export Mathcad's variable names.

1-Visitor
May 12, 2014

You can cheat by using the MathRegion XML export API in VBscript. This will, with a little care show you all the defined variables, the maths expressions, and results. You have to decode the XML though.

At the moment I'm doing it for a file compare function but it's not finished yet.

Philip

1-Visitor
May 12, 2014

Take a look at this old thread for some various ways of saving tables as text files:

http://communities.ptc.com/message/180125