makeVariantAssembly
Syntax
Description
converts the Variant Component block variantAssemblyComp = makeVariantAssembly(variantComponent)variantComponent to
a Variant Assembly Component block and returns the Variant Assembly
Component block object variantAssemblyComp. Use this syntax
if the variant control mode of the Variant Component block is
label and has only Model blocks and Subsystem
Reference blocks as its variant choices.
converts the Variant Component block variantAssemblyComp = makeVariantAssembly(variantComponent,Name=Value)variantComponent to
a Variant Assembly Component block as specified by one or more Name-Value
arguments and returns the Variant Assembly Component block object
variantAssemblyComp. Use this syntax if the variant control mode of
the Variant Component block is expression or has
at least one inline component as its variant choice.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Limitations
Only Variant Component blocks with Variant control mode set to
labelorexpressioncan be converted to a Variant Assembly Component block.The conversion from Variant Component to Variant Assembly Component is not supported for AUTOSAR architecture.
More About
Alternatives
You can convert a Variant Component block to a Variant Assembly Component block interactively, through the Block Parameters dialog box, or programmatically. For more information, see Convert Variant Component to Variant Assembly Component.
Version History
Introduced in R2023bSee Also
Blocks
Objects
Functions
addChoice|addVariantComponent|getActiveChoice|getChoices|getCondition|makeVariant|setActiveChoice|setCondition|updatePortsFromChoices
Topics
- Overview of System Composer API
- Create Variant Components in Label Mode
- Decompose and Reuse Components
- Calculate Endurance Using Quadcopter Architectural Design
- Design Insulin Infusion Pump Using Model-Based Systems Engineering
- Add or Remove Variant Choices of Variant Assembly Component Blocks Using External File