Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I am using Mathcad V15. I have started playing with using controls in some of my sheets to limit certain variables to having only certain inputs. In my one sheet, I added a list box control for a variable, and the only choices the user could select would be "B", "C", or "D". When I finished my sheet, I set the variable to selection "C", saved and then closed. When I reopened the sheet, the selection of "C" for the variable was cleared. Is there a reason why the sheet did not retain the selection for the control? Is there a setting somewhere that I can change that will allow the selection to remain? Thank you!
Solved! Go to Solution.
When you open a worksheet, Mathcad re-initializes all of the controls contained within the file and thus not preserve their saved state. This is the intended functionality of Mathcad.
However, you may consider to use Web controls(Insert > Control) for this use case. In case of Web Controls(no scripting), the selections for each control are persistent; that is, they remain in the same selected state when a Mathcad worksheet is closed and reopened. This has been documented in Mathcad help.
Thanks,
Vipul
When you open a worksheet, Mathcad re-initializes all of the controls contained within the file and thus not preserve their saved state. This is the intended functionality of Mathcad.
However, you may consider to use Web controls(Insert > Control) for this use case. In case of Web Controls(no scripting), the selections for each control are persistent; that is, they remain in the same selected state when a Mathcad worksheet is closed and reopened. This has been documented in Mathcad help.
Thanks,
Vipul
Is there a reason why the sheet did not retain the selection for the control?
Its because the software was written that way. Upon loading the components are initialized and the sheet is recalculated from a anew.
Is there a setting somewhere that I can change that will allow the selection to remain?
Not out of the box, but there are workarounds like storing the state of a component in the custom metadata of the worksheet or in a textbox and restoring it from there at load time, but here are limitations and drawbacks.
You will find some older threads dealing with the topic using the search function of this forum.
A good one from Richard is here
https://community.ptc.com/t5/PTC-Mathcad/Saving-the-state-of-controls-zip/m-p/450354#M174952
My first idea was that Richard might have put it in his collection of useful components, but after a quick glance at it it seems that thats not the case. I post the link to that collection anyway, maybe you find something useful and interesting:
https://community.ptc.com/t5/PTC-Mathcad/Extra-Components-and-Controls/m-p/450450