%% Automatic Mask Icon Promotion in Variant Subsystems
% Copyright 2020 The MathWorks, Inc.
%%
% This example demonstrates how Simulink(R) automatically displays the mask
% icon of the active variant block on the parent Variant Subsystem block.
% The example shows mask icon promotion for these types of icons:
%%
% * Plain text
%%
% * Plot
%%
% * Built-in icon
%%
% * Image
%% Explore the Model
% Open the example model |slexVariantSubsystemMaskIconPromotion|.
open_system('slexVariantSubsystemMaskIconPromotion');
% The model has four Variant Subsystem blocks (|VSS 1|, |VSS 2|,
% |VSS 3|, and |VSS 4|). The Variant Subsystem blocks do not have a mask.
% The active variant block within each subsystem has a mask with a mask
% icon.
%%
% * |VSS 1|: The mask icon on the active variant block is plain text.
%%
open_system('slexVariantSubsystemMaskIconPromotion/VSS 1');
%%
% * |VSS 2|: The mask icon on the active variant block is a plot.
%%
open_system('slexVariantSubsystemMaskIconPromotion/VSS 2');
%%
% * |VSS 3|: The mask icon on the active variant block is a built-in icon.
%%
open_system('slexVariantSubsystemMaskIconPromotion/VSS 3');
%%
% * |VSS 4|: The mask icon on the active variant block is an image.
%%
open_system('slexVariantSubsystemMaskIconPromotion/VSS 4');
%% Simulate the Model to View Mask Icon Promotion 
% On the *Simulation* tab, click *Run* to see how the mask icon of the
% active choice gets promoted to the parent subsystem.
%%
sim('slexVariantSubsystemMaskIconPromotion');
open_system('slexVariantSubsystemMaskIconPromotion');