3-Newcomer
June 30, 2026
Question
Advanced Controls - List Box - Selection won't map to output
- June 30, 2026
- 1 reply
- 52 views
Hi. I am trying to use an advanced list box to select a beam section from the first column in a matrix that I can then use to lookup related properties further on in my calc sheet. The problem I have is that the selection does not get parsed to the output variable. Any help with this would be appreciated, I can’t seem to find anything useful online, but I am clearly missing some detail.
Here is the list box code and MathCAD file attached.
// TODO: Add your initialization code here
function ListBoxEvent_Start(Inputs, Outputs) {
// TODO: Add your code here
};
function ListBoxEvent_Exec(Inputs, Outputs) {
// 1. Clear the list box contents FIRST to reset it
ListBox.ResetContent();
var options = Inputs[0].Value;
// 2. Loop through and add the strings
for(var i=0; i < options.length; i++) {
ListBox.AddString(options[i]);
}
// 3. Set your output
Outputs[0].Value = options[ListBox.CurSel()];
//Outputs[0].Value = ListBox.get_text(ListBox.CurSel());
};
function ListBoxEvent_Stop(Inputs, Outputs) {
// TODO: Add your code here
};
function ListBox_SelChanged(Inputs, Outputs) {
// TODO: Add your code here
};
function ListBox_DblClick(Inputs, Outputs) {
// TODO: Add your code here
};

