Main Content

getStereotypes

Get stereotypes applied on element of architecture model

Description

stereotypes = getStereotypes(element) gets an array of fully qualified stereotype names that have been applied on an element of an architecture model.

example

Examples

collapse all

Create a model with a component called Component.

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

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");

Apply the stereotype to the component and get the stereotypes on the component.

comp.applyStereotype("LatencyProfile.LatencyBase");
stereotypes = getStereotypes(comp)
stereotypes =

  1×1 cell array

    {'LatencyProfile.LatencyBase'}

Input Arguments

collapse all

Output Arguments

collapse all

List of stereotypes, returned as a cell array of character vectors in the form '<profile>.<stereotype>'.

Data Types: char

More About

collapse all

Version History

Introduced in R2019a