cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Using "Animation" to loop a Mathcad 15 worksheet and writing solution to a text file

rsulwinski
10-Marble

Using "Animation" to loop a Mathcad 15 worksheet and writing solution to a text file

I have used "Animation" together with WRITEPRN in Mathcad 15 to successfully loop a worksheet and export data to text files. If you record an animation in the attached worksheet, a text file shall be created for each FRAME. The name of each text file corresponds to the input variable of interest (IDpipe), whereas the entry in each text file contains the calculated quantity (WIDTH). 

 

Is there a way to modify the contents inside WRITEPRN to make Mathcad store all results in one text file containing two columns (IDpipe & WIDTH), where number of rows with data corresponds to the number of FRAMES used to record that animation? 

 

Currently I am using a workaround by letting Excel read the folder containing all solution text files. It would be more elegant though, to let Mathcad put everything in one text file right away.

1 REPLY 1
Werner_E
25-Diamond I
(To:rsulwinski)

How about creating the file using WRITEPRN if FRAME=0 and using APPENDPRN otherwise?

As an alternative you may create an Excel file instead by using WRITEEXCEL where you can specify the row the data is written depending on the value of FRAME.

Announcements

Top Tags