Skip to main content
1-Visitor
May 28, 2025
Question

MathCad Prime 10 Advanced Controls Button and WRITEPRN

  • May 28, 2025
  • 3 replies
  • 713 views

Hi!

Is there a way to implement MathCad Prime Advanced Controls to execute WRITEPRN function on button press using Version 10 Advanced Controls? This is so that WRITE or APPEND will only be performed upon the user clicking on the button.

 

Thanks!

3 replies

21-Topaz II
May 28, 2025

This is a great question.

Currently disable the WRITEPRN statement and enable it when needed to write the file.

Would welcome a solution like you suggest.

 

Cheers

Terry

14-Alexandrite
May 28, 2025

Try this workaround:

 

  1. First setup your output file by writing a "1" in the same file (using nested matrices) or in a separate file.

  2. Now in your calculation document, before your control button, read the value of the number and feed that as an input into your control button.

  3. In your control button, when the button is pressed, output the number+1, otherwise output a zero.

  4. At the point you want to save your data, compare this number with the number in the file.  If the new number is higher, then save the data, along with the new number.

 

14-Alexandrite
May 29, 2025

@ttokoro made a good point .  Here is my version using the date+time, down the the second.   This is in VBScript but I am sure there is an equivalent in Java.

 

SPaulis_2-1748476667819.png

 

 

ttokoro
21-Topaz I
21-Topaz I
May 28, 2025

 

Prime 11 fall in infinity roop.

image.png

 

Prime 10 save just one time when push the button.

image.png

t.t.