getValue

Get value of a property from an element instance

Description

example

[value,unit] = getValue(instance,property) obtains the property of the instance and assigns it 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.

weightValue = getValue(instance,'MechComponent.weight');

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

Output Arguments

collapse all

Value of the property. The data type depends on how the property is defined in the profile.

String that describe the unit of the property as defined in the profile.

Introduced in R2019a