Main Content

getDependentLibraries

Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

Returns a list of libraries that are used in variant configurations

Syntax

dependentLibraries = VarConfigObj.getDependentLibraries(ConfigName)

Description

dependentLibraries = VarConfigObj.getDependentLibraries(ConfigName)returns a list of libraries that are used in 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 libraries, as a cell array.

Examples

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

% Open model
open_system('slexVariantConfigurationAnalysis'); 

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

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

Version History

Introduced in R2019a