Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi,
On Mathcad 15 I used a VB script to recalculate the worksheet using a "worksheet.Recalculate()" comment assigned to a button, but this comment not working on the PTC Mathcad Prime API.
Can you help me to solve this.
Solved! Go to Solution.
The method is now called Worksheet. Synchronize()
See attached a Prime 10 sheet with a "recalculate" button.
The Prime help is a nightmare, especially when it comes do the API and the advanced controls. It definitely does not deserve to be called “help” and certainly not “documentation”.
Nevertheless, somewhere in the depths of this “Help” you will find the very button that I use in the attached sheet.
Unfortunately, I couldn't find the place in the confusing help where this button comes from. It is neither in the description of the controls button, nor in its example, nor in the “documentation” of the API.
However, I definitely know that I once copied it from the Prime help ...
Here is the script (JScript) used in the button
function PushBtnEvent_Start(Inputs, Outputs) {
};
function PushBtnEvent_Exec(Inputs, Outputs) {
};
function PushBtnEvent_Stop(Inputs, Outputs) {
};
function PushBtn_Click(Inputs, Outputs) {
var Mathcad = new ActiveXObject("MathcadPrime.Application");
if (Mathcad != null) {
var Worksheet = Mathcad.ActiveWorksheet;
if (Worksheet != null) {
Worksheet. Synchronize();
Worksheet = null;
}
Mathcad = null;
}
};
EDIT: Heureka! Finally found the help page where the button stems from. Shouldn't help be more intuitive to use ....?
The method is now called Worksheet. Synchronize()
See attached a Prime 10 sheet with a "recalculate" button.
The Prime help is a nightmare, especially when it comes do the API and the advanced controls. It definitely does not deserve to be called “help” and certainly not “documentation”.
Nevertheless, somewhere in the depths of this “Help” you will find the very button that I use in the attached sheet.
Unfortunately, I couldn't find the place in the confusing help where this button comes from. It is neither in the description of the controls button, nor in its example, nor in the “documentation” of the API.
However, I definitely know that I once copied it from the Prime help ...
Here is the script (JScript) used in the button
function PushBtnEvent_Start(Inputs, Outputs) {
};
function PushBtnEvent_Exec(Inputs, Outputs) {
};
function PushBtnEvent_Stop(Inputs, Outputs) {
};
function PushBtn_Click(Inputs, Outputs) {
var Mathcad = new ActiveXObject("MathcadPrime.Application");
if (Mathcad != null) {
var Worksheet = Mathcad.ActiveWorksheet;
if (Worksheet != null) {
Worksheet. Synchronize();
Worksheet = null;
}
Mathcad = null;
}
};
EDIT: Heureka! Finally found the help page where the button stems from. Shouldn't help be more intuitive to use ....?
Thank you so much.