setValue

Set value of property for element instance

Description

example

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

Element instance, specified by a systemcomposer.analysis.ArchitectureInstance, systemcomposer.analysis.ComponentInstance, systemcomposer.analysis.PortInstance, or systemcomposer.analysis.ConnectorInstance object. 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.

Property, specified as a character vector in the form '<stereotype>.<property>'.

Property value, specified as a data type that depends on how the property is defined in the profile.

Introduced in R2019a