Main Content

getBlockDifferences

Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

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

Syntax

getBlockDifferences = varConfigObj.getBlockDifferences()

Description

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.

Note

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.

Examples

% Add model to path
addpath(fullfile(matlabroot,'examples','simulink_variants','main'));

% Open model
open_system('slexVariantManagement'); 

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

% Get block differences
getBlockDifferences = varConfigObj.getBlockDifferences()

Version History

Introduced in R2019a