Main Content


Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

List of blocks that differ in their active choice between multiple named variant configurations


getBlockDifferences = varConfigObj.getBlockDifferences()


Use this method to find the blocks that differ in their active choice between 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 getBlockDifferences method.


This method requires Variant Manager for Simulink®.

getBlockDifferences = varConfigObj.getBlockDifferences() returns a list of blocks that are active in some of the analyzed variant configurations and inactive in other configurations. varConfigObj is the VariantConfigurationAnalysis object for a model.

Output Arguments

expand all

List of blocks that differ in active choice between variant configurations, 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 block differences
getBlockDifferences = varConfigObj.getBlockDifferences()

Version History

Introduced in R2019a