Main Content


Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

List of dependent models that are used in a named variant configuration


dependentModels = varConfigObj.getDependentModels(configName)


Use this method to find the dependent models used in a named variant configuration after analyzing it 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 getDependentModels method.


This method requires Variant Manager for Simulink®.

dependentModels = varConfigObj.getDependentModels(configName) returns a list of dependent models that are used in the variant configuration named configName. varConfigObj is the VariantConfigurationAnalysis object for a model.

Input Arguments

expand all

Name of the variant configuration for which you want to find the dependent models, specified as a character vector. You must analyze this configuration using the Simulink.VariantConfigurationAnalysis class first.

Output Arguments

expand all

List of dependent models, 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 dependent models
dependentModels = varConfigObj.getDependentModels('NonLinExterLowFid')

Version History

Introduced in R2019a