Variable from a subsystem as global

I have a subsystem with two tabs, each with one Combo Box. Let’s say that I chose from my Combo Box ‘NVB082N65S3F’. How can I initialize FET_bridge as global? because based on the combo box selection I have a switch case function in my simulation parameters.

The model initialization done top-down where the Model Initialization Commands (Simulation + Simulation parameters… + Initialization tab) are run first, then the various masked subsystem initialization commands (right-click component + Subsystem + Edit mask… + Initialization tab).

Your question suggests you want a bottom-up approach, which is to modify the Model Initialization Commands behavior from a dialog setting in a masked subsystem. That is not possible with PLECS.

What you can do is assign a variable in your Model Initialization Commands (e.g. “FET_bridge_device = 2”) and then assign that value to your Combo Box by clicking combo box in the block parameters window, opening the drop-down, an then replace the “<reference>” string with the variable you defined (“FET_bridge_device”).