Main Content


Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

List of blocks that are inactive in named variant configurations


getNeverActiveBlocks = varConfigObj.getNeverActiveBlocks()


Use this method to find the blocks that are always inactive across all named variant configurations after analyzing them using the Simulink.VariantConfigurationAnalysis class. You must create a variant configuration analysis object of type Simulink.VariantConfigurationAnalysis for a model and use it to analyze the required named variant configurations for that model before calling the getNeverActiveBlocks method.


This method requires Variant Manager for Simulink®.

getNeverActiveBlocks = varConfigObj.getNeverActiveBlocks() returns a list of blocks that are inactive in all the named variant configurations that have been analyzed using a VariantConfigurationAnalysis object. varConfigObj is the VariantConfigurationAnalysis object for a model.

Output Arguments

expand all

List of blocks that are never active in all the named variant configurations that are analyzed, returned as a cell array.


% Add model to path

% Open model

% Get variant configuration analysis object
varConfigObj = Simulink.VariantConfigurationAnalysis('slexVariantManagement', 'NamedConfigurations', {'LinInterStd', ...
'NonLinExterLowFid', 'NonLinExterHighFid'})

% Get never active blocks
neverActiveBlocks = varConfigObj.getNeverActiveBlocks()

Version History

Introduced in R2019a