getVariantCondition

Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

Returns variant conditions for blocks in given variant configuration

Syntax

variantCondition = VarConfigObj.getVariantCondition(ConfigName,BlockName)

Description

variantCondition = VarConfigObj.getVariantCondition(ConfigName,BlockName), returns the variant condition for block specified by BlockName in given 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.

Name of the block.

Output Arguments

expand all

Returns variant conditions for blocks in given variant configuration.

Examples

% Open model
open_system('slexVariantManagement'); 

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

% Get variant condition 
VariantCondition = VarConfigObj.getVariantCondition('NonLinExterLowFid',...
'slexVariantManagement/Controller/Linear Controller')
Introduced in R2019b