You can use the setActiveConfigSet
method of the Simulink.BlockDiagram
class to change the active variant subsystem for a model from a MATLAB script. Here's an example code snippet:
main.m351 chars13 lines
In this example, replace 'mySimulinkModel'
with the name of your Simulink model, and replace 'myVariantSubsystem'
with the name of the variant subsystem that you want to make active. After running this script, the active variant subsystem for the model will be the one named 'myVariantSubsystem'
.
gistlibby LogSnag