Main Content


Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

List of libraries that are used in a named variant configuration


dependentLibraries = varConfigObj.getDependentLibraries(configName)


Use this method to find the libraries 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 getDependentLibraries method.


This method requires Variant Manager for Simulink®.

dependentLibraries = varConfigObj.getDependentLibraries(configName) returns a list of libraries 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 libraries, specified as a character vector. You must analyze this configuration using the Simulink.VariantConfigurationAnalysis class first.

Output Arguments

expand all

List of dependent libraries, returned as a cell array.


% Add model to path

% Open model

% Get variant configuration analysis object
varConfigObj = Simulink.VariantConfigurationAnalysis('slexVariantConfigurationAnalysis', 'NamedConfigurations', {'VendorACtrlLinear', ...
'VendorACtrlNonLinear', 'VendorACtrlFuzzy'})

% Get dependent libraries
dependentLibraries = varConfigObj.getDependentLibraries('VendorACtrlLinear')

Version History

Introduced in R2019a