setValue

Set the value of a property for an element instance

Description

setValue(instance,property,value) sets the property of the instance to value. This function is part of the instance API that you can use to analyze the model iteratively, element by element.instance refers to the element instance on which the iteration is being performed.

Examples

collapse all

Assume that a MechComponent stereotype is attached to the specification of the instance.

setValue(instance,'MechComponent.weight',10);

Input Arguments

collapse all

This function is part of the instance API that you can use to analyze the model iteratively, element by element.instance refers to the element instance on which the iteration is being performed.

Data Types: systemcomposer.analysis.ArchitectureInstance | systemcomposer.analysis.ComponentInstance | systemcomposer.analysis.PortInstance | systemcomposer.analysis.ConnectorInstance

String in the form <stereotype>.<property>.

Data Types: string

Introduced in R2019a