Thanks a lot for your explanations. After spending some time reviewing the documentation and testing different cases in my model, I think I now understand the behaviour better — but I would really appreciate confirmation from more experienced users in case I’m still missing something.
As far as I can tell, the GUI definition (the structure created with the GUI Builder) is stored in the model tree, while the visible GUI window corresponds to a runtime view instance living in the view tree.
This runtime instance includes temporary state such as itemcurrent in comboboxes, checkbox states, etc.
Based on what I observed:
When I embed this GUI into a Dashboard using a GUI Class, FlexSim seems to create a new view instance from the model-tree definition,
…and not from the currently opened GUI window.
Therefore, the GUI Class does not inherit any runtime state (like the selected itemcurrent), and all controls appear with their default values.
This behaviour is not explicitly stated in the documentation (as far as I’ve found), but it appears consistent with how the model tree and view tree are conceptually separated.
Could someone confirm if this interpretation is correct?
Additionally, if one needs persistence or synchronization between the GUI and the GUI Class, it seems necessary to externalize that temporary UI state into model nodes, by using attributes like coldlink and/or pickitem, and then restoring those values when new GUI instances (such as GUI Class controls) are created inside the Dashboard.
Finally, the second issue I experienced — where one combobox wasn’t behaving correctly when used inside the Dashboard — was caused by a missing parameter in one of my User Commands. After fixing the parameter list, the behaviour is now correct.
Thanks again for the support, and I’d appreciate any confirmation or corrections from users who know the internals better than I do.