showUI
R2026bShow variant configuration analysis report for a model
Description
showUI( shows the variant
configuration analysis report for a model. varConfigAnalysisObj)varConfigAnalysisObj is the
Simulink.VariantConfigurationAnalysis object used to analyze variant
configurations for the model.
Examples
This example shows how to use the Simulink.VariantConfigurationAnalysis object to analyze variant configurations programmatically.
To analyze variant configurations using Simulink® Variant Manager™, see Analyze Variant Configurations in Models Containing Variant Blocks.
Open the model slexVariantConfigurationAnalysis.
open_system("slexVariantConfigurationAnalysis"); You can provide either a list of named variant configurations or the variable groups to the creation function for the Simulink.VariantConfigurationAnalysis object. The operation returns a variant configuration analysis object for the model.
varConfigObjNamedConfig = Simulink.VariantConfigurationAnalysis("slexVariantConfigurationAnalysis",... NamedConfigurations={"VendorACtrlLinear",... "VendorACtrlNonLinear","VendorACtrlFuzzy"})
varConfigObjNamedConfig =
VariantConfigurationAnalysis with properties:
ModelName: 'slexVariantConfigurationAnalysis'
Configurations: {'VendorACtrlFuzzy' 'VendorACtrlLinear' 'VendorACtrlNonLinear'}
You can use the variant configuration analysis object to analyze the variant configurations using different functions specified in the following steps. This example analyzes the named configurations.
Get the list of active blocks in the variant configuration VendorACtrlLinear.
activeblocks = getActiveBlocks(varConfigObjNamedConfig,"VendorACtrlLinear");Get the list of blocks that are always active across all the named variant configurations that have been analyzed.
alwaysActiveBlocks = getAlwaysActiveBlocks(varConfigObjNamedConfig);
Get the list of blocks that are active in some of the analyzed variant configurations and inactive in other configurations.
blockDifferences = getBlockDifferences(varConfigObjNamedConfig);
Get the list of dependent libraries for a variant configuration.
dependentLibraries = getDependentLibraries(varConfigObjNamedConfig,"VendorACtrlNonLinear");Get the list of dependent models for a variant configuration.
dependentModels = getDependentModels(varConfigObjNamedConfig,"VendorACtrlFuzzy");Get the list of blocks that are inactive in all the named variant configurations that have been analyzed.
neverActiveBlocks = getNeverActiveBlocks(varConfigObjNamedConfig);
Get the variant condition on a block in a named variant configuration.
variantCondition = getVariantCondition(varConfigObjNamedConfig,"VendorACtrlNonLinear",... "slexVariantConfigurationAnalysis/Controller/NonLinear");
Show the variant configuration analysis report for a model after analyzing it.
showUI(varConfigObjNamedConfig);
Hide the variant configuration analysis report for a model after analyzing it.
hideUI(varConfigObjNamedConfig);
Alternatively, use this syntax to specify a list of variable groups to analyze. You can use the variant configuration analysis object functions to analyze the configurations represented by these variable groups.
varConfigObjVarGroup = Simulink.VariantConfigurationAnalysis("slexVariantConfigurationAnalysis",... VariableGroups=[struct('Name', 'VendorANonLinear',... 'VariantControls', {{'CONTROLLER', 1, 'EXTERNAL_SENSOR', 1, 'ORDER', 1, 'SATURATE', 1, 'VENDOR', 1}}),... struct('Name', 'VendorALinear',... 'VariantControls', {{'CONTROLLER', 0, 'EXTERNAL_SENSOR', 1, 'ORDER', 1, 'SATURATE', 1, 'VENDOR', 1}})]);
Input Arguments
Variant configuration analysis data, specified as a
Simulink.VariantConfigurationAnalysis object.
Version History
Introduced in R2019aStarting in R2026b, showUI is available in the Simulink®
Variant Manager™
product. In releases R2022b through R2026a, the function is available in the Variant Manager for Simulink support package. In earlier releases, the function is available in Simulink.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)