Main Content

variantLegend

Class:Simulink.VariantManager
Package:万博1manbetx

Display or control behavior of variant condition legend

Syntax

Simulink.VariantManager.variantLegend(modelName, action)

Description

Simulink.VariantManager.variantLegend(modelName,action)displays or performs a specifiedactionon the variant condition legend.

Input Arguments

expand all

Model for which the variant legend is displayed, specified as a character vector.

Task to be performed on the variant condition legend for the model. You can specify the task as:

  • 'open'— Displays the variant condition legend for a model. The model must be open. If the legend is opened for the first time, the model is updated.

  • 'print'——打印条件变体传说中的数据。The legend must be open. There is no preview before printing the legend.

  • 'showCodeConditions'— Displays code generation conditions column in the variant condition legend. The legend must be open.showCodeConditionsis used as a name-value pair and accepts'on'or'off'as its values.

  • 'close'— Closes the variant condition legend belonging to the specified model.

Examples

model = 'sldemo_variant_subsystems'; open_system(model); % Open the variant condition legend Simulink.VariantManager.variantLegend(model,'open'); % Display the code generation conditions Simulink.VariantManager.variantLegend(model,'showCodeConditions','on');

Version History

Introduced in R2017b