Main Content

getPropertyValue

Get value of architecture property

    Description

    value = getPropertyValue(element,property) gets the non-evaluated property value for the provided architectural element.

    example

    Examples

    collapse all

    Create a profile, add a component stereotype, and add a property with a default value.

    profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");
    stereotype = addStereotype(profile,"electricalComponent",AppliesTo="Component");
    stereotype.addProperty("latency",Type="double",DefaultValue="10");

    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. Open the Profile Editor.

    model.applyProfile("LatencyProfile")
    comp.applyStereotype("LatencyProfile.electricalComponent")
    systemcomposer.profile.editor(profile)

    Get the property value.

    value = getPropertyValue(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 character vector.

    Data Types: char

    More About

    collapse all

    Version History

    Introduced in R2019a