Main Content

getEvaluatedPropertyValue

Get evaluated value of property from element

Description

value = getEvaluatedPropertyValue(element,property) gets the evaluated value of a property specified on the architectural element.

example

Examples

collapse all

Create a profile with a stereotype and properties, open the Profile Editor, then apply the profile to the model.

profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");
latencybase = profile.addStereotype("LatencyBase");
latencybase.addProperty("latency",Type="double");
latencybase.addProperty("dataRate",Type="double",DefaultValue="10");
systemcomposer.profile.editor(profile)
model.applyProfile("LatencyProfile");

Create a model with a component called Component.

model = systemcomposer.createModel("archModel");
systemcomposer.openModel("archModel");
arch = get(model,"Architecture");
comp = addComponent(arch,"Component");

Apply the profile to the model and apply the stereotype to the component.

model.applyProfile("LatencyProfile");
comp.applyStereotype("LatencyProfile.electricalComponent");

Get the property value

value = getEvaluatedPropertyValue(comp,"LatencyProfile.electricalComponent.latency")
value =

    10

Input Arguments

collapse all

Property name, specified as a character vector or string in the form "<profile>.<stereotype>.<property>".

Data Types: char | string

Output Arguments

collapse all

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

More About

collapse all

Version History

Introduced in R2019a