systemcomposer.arch.VariantComponent
Variant component in System Composer model
Description
A VariantComponent object represents a variant component that
allows you to create multiple design alternatives for a component in a System Composer™ model. This class inherits from systemcomposer.arch.BaseComponent. This class is derived from systemcomposer.arch.Element.
Creation
Create a variant component using the addVariantComponent function.
varComp = addVariantComponent(archObj,'compName');Properties
Object Functions
addChoice | Add variant choices to variant component |
setCondition | Set condition on variant choice |
setActiveChoice | Set active choice on variant component |
getChoices | Get available choices in variant component |
getActiveChoice | Get active choice on variant component |
getCondition | Return variant control on choice within variant component |
makeVariantAssembly | Convert variant component to variant assembly component |
updatePortsFromChoices | Update ports in Variant Component block to match its variant choices |
isFMU | Determine component link to Functional Mockup Unit (FMU) |
isProtected | Determine component reference model is protected |
isReference | Determine component reference to another model |
connect | Create architecture model connections |
getPort | Get port by name |
applyStereotype | Apply stereotype to model element |
getStereotypes | Get stereotypes applied on model element |
changeStereotype | Change currently applied stereotype to new stereotype in its stereotype hierarchy |
removeStereotype | Remove stereotype from model element |
getPropertyValue | Get value of architecture property |
getEvaluatedPropertyValue | Get evaluated value of property from element |
getStereotypeProperties | Get stereotype property names on element |
getProperty | Get property value corresponding to stereotype applied to element |
setProperty | Set property value corresponding to stereotype applied to element |
hasStereotype | Find if element has stereotype applied |
hasProperty | Find if element has property |
getParameter | Get parameter from architecture or component |
getEvaluatedParameterValue | Get evaluated value of parameter from element |
getParameterNames | Get parameter names on element |
getParameterValue | Get value of parameter |
setParameterValue | Set value of parameter |
setUnit | Set units on parameter value |
resetParameterToDefault | Reset parameter on component to default value |
getQualifiedName | Get model element qualified name |
lookup | Search for architectural element |
current | Get object of currently selected element |
destroy | Remove model element |
Examples
More About
Version History
Introduced in R2019a
See Also
Blocks
Objects
Functions
addChoice|addVariantComponent|getActiveChoice|getChoices|getCondition|makeVariant|makeVariantAssembly|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





