Main Content

getActiveBlocks

Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

Returns a list of active blocks for variant configuration

Syntax

activeBlocks = VarConfigObj.getActiveBlocks(ConfigName)

Description

activeBlocks = VarConfigObj.getActiveBlocks(ConfigName)returns a list of active blocks for variant configuration.

Input Arguments

expand all

Variant configuration object for a specified configuration. You can use the Simulink.VariantConfigurationAnalysis method to obtain this value.

Specifies the name of variant configuration.

Output Arguments

expand all

Returns a list of active blocks as a cell array.

Examples

% Open model
open_system('slexVariantManagement'); 

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

% Get active blocks
ActiveBlocks = VarConfigObj.getActiveBlocks('LinInterStd')
Introduced in R2019a