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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Mathcad 15 push button keeps executing without clicking it

adnn
8-Gravel

Mathcad 15 push button keeps executing without clicking it

Dear all,

 

Attached is a sample mathcad sheet, where I created a push button which should write some data to an excel sheet. But if I enable evaluation, my mathcad automatically runs the script in that push button and writes data to excel file (irrespective of whether I click the button or not). 

 

The basic idea is, I would like to make lots of iterations / changes in mathcad, and once I am happy with the output, I would like to write the data to excel (by clicking a button). I wouldn't want the excel file to keep getting updated every time I make some changes to the mathcad sheet.

 

Required output:


Output(0) = "Yes"

Output(1) = worksheet.name

 

But Output(0) variable is by default, defined as "No" and I don't want it to change to "yes" unless I explicitly click the button (because I used an if statement to write file to excel). Kindly suggest changes / better way to achieve this ?

 

Your help would be much appreciated !

 

Many thanks in advance,

Aravind.

 

1 ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:adnn)

3 REPLIES 3

Hi,

 

The simple trick I use is to create a WRITEEXCEL statement.  If you right click the statement one of the options in the drop down box that appears is "Disable.Evaluation".  Disable the statement.  The rest of the sheet operates as normal.  When you are ready to transfer the data right click the disables statement and the option is now "Enable Evaluation"

Cheers

Terry

Thanks for the suggestion Terry, but I already thought of it and wanted a
bit more elegant and flashy way of doing it xD (my sheet is supposed to be
used by people who are new to mathcad)

So I went for the push button approach 🙂 is there any other way this push
button approach could work ?
RichardJ
19-Tanzanite
(To:adnn)

See attached

Top Tags