Simulink.VariantUtils.convertToVariantSubsystem
Class: Simulink.VariantUtils
Namespace: Simulink
Convert Subsystem, Model, or Configurable Subsystem block to Variant Subsystem block
Since R2023b
Syntax
Description
converts a Subsystem block, Model block, or
Configurable Subsystem block to a Variant Subsystem block. A
Variant Subsystem can contain a combination of
Subsystem blocks, Model blocks, or
Subsystem Reference blocks as choices.variant_subsystem
= Simulink.VariantUtils.convertToVariantSubsystem(blockPathOrHandle
)
converts a Subsystem block, Model block, or
Configurable Subsystem block to a Variant Subsystem block with the
block parameters specified as options.variant_subsystem
= Simulink.VariantUtils.convertToVariantSubsystem(blockPathOrHandle
, options
)
Input Arguments
Output Arguments
Examples
Limitations
The convertToVariantSubsystem
method does not support
Subsystem blocks in a Simscape™ model that has the Editing Mode configuration
parameter set to Restricted
.
Alternatives
Simulink Editor
In the Simulink® Editor, right-click the Subsystem or Model block and select Subsystems & Model Reference > Convert to > Variant Subsystem.