Main Content

getDependentLibraries

Class: Simulink.VariantConfigurationAnalysis
Package: Simulink

List of libraries that are used in a named variant configuration

Syntax

dependentLibraries = varConfigObj.getDependentLibraries(configName)

Description

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.

Note

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.

Examples

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

% Open model
open_system('slexVariantConfigurationAnalysis'); 

% 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