Skip to main content
10-Marble
October 21, 2025
Solved

Dependent Listbox doesn't retain value on save and then open

  • October 21, 2025
  • 1 reply
  • 1022 views

I have two list boxes (MathCAD Prime 11.0.0.0), The selection of one list box drives the list of the other box (see picture). The problem I have is the values update on re-opening the sheet. I can get the sheet to remember the 'Type' selection. However I can't get the second list box to remember the selection from the previous save and close. Below is the code in the jscript:-

 
// TODO: Add your initialization code here
ListBox.ResetContent();
// Add Strings here as needed
 
function ListBoxEvent_Start(Inputs, Outputs) {
   // TODO: Add your code here
ListBox.ResetContent()
if(Inputs[0].Value=="UC"){
ListBox.AddString("356 x 406x 1299");
ListBox.AddString("356 x 406x 1202");
ListBox.AddString("356 x 406x 1086");
ListBox.AddString("356 x 406x 990");
... (the full script code is attached)
So I know/suspect the issue is the 'ListBox.ResetContent()' line but how do I stop the script running on open or remembering the selection, so that it keeps the previous save options?
The sheet options are shown in the screen grab 'sheet options selections.png', I have seen that if items in this list to do with scripts could be a solution, but the check options don't look they would help as they are to run scripts.
Any ideas?
Best answer by DJNewman

I just got a new update on this from the Mathcad team...

 

JScript and Python controls with ORIGIN = 1
• This is a bug that surfaced in Prime 11.0.1.0
• Workaround: Hard define ORIGIN to zero in the worksheet (ORIGIN:=0) before the first control then set it back to one after the control. If multiple controls in worksheet, then set it to zero before each control and reset to one after. 
• Will be fixed in Prime 12

 

I wish that our bug-fixing build didn't create a new bug (average software company experience), but what do you think about the workaround?

1 reply

DJNewman
18-Opal
October 21, 2025

With your Mathcad options of not running the Advanced Control script on worksheet open or recalculate, you can have, say, HEB selected on the first List Box and HEB320 retained on the second listbox upon saving, closing, and reopening the worksheet if you... upgrade to PTC Mathcad Prime 11.0.1.0.

 

This is one of the things that was fixed from 11.0.0.0 to 11.0.1.0. https://www.ptc.com/en/support/article/CS449753 

PTC Marketer Creo and Mathcad. I run their YouTube channels, some Creo campaigns, and all Mathcad campaigns and communications.
25-Diamond I
October 21, 2025

Mathcad Prime 11.0.1.0.

 


Oops, I wasn't even aware that this intermediate version existed. Thanks for the information.

Is there a full list of all the changes, improvements and bug fixes somewhere? Not spread across different KB articles.

DJNewman
18-Opal
October 21, 2025

Yeah, marketing (me) hasn't done a great job announcing this exists. It was the feature story in September's Mathcad Minute, and that's about it!

I actually remember that the original poster, Mr. Jupp, had asked our product manager last year about an in-product notification or prompt that there is a new version available and to make downloading it easier, because at the time he hadn't heard of 10.0.1.0's existence. And now... no one knows about 11.0.1.0's.
(Obviously no work went into such a prompt.)

 

 

You're familiar from Prime 10.0.1.0 about the PTC Update Advisor:

DJNewman_0-1761078356711.png

 

Unfortunately, the Update Advisor remains an incomplete list. It only reports resolved issues that have an SPR number. There were other things fixed as well but aren't documented here or anywhere else. In fact, even I don't know what they are... Sure makes it hard to market it, huh...

PTC Marketer Creo and Mathcad. I run their YouTube channels, some Creo campaigns, and all Mathcad campaigns and communications.