Main Content

removeStereotype

Remove stereotype from model element

Description

removeStereotype(element,stereotype) removes a specified stereotype applied to a model element from the model element.

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, remove the stereotype from the component, and get the stereotypes on the component.

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

  1×0 empty cell array

Input Arguments

collapse all

Stereotype, specified as a character vector or string in the form "<profile>.<stereotype>". The profile must already be applied to the model.

Data Types: char | string

More About

collapse all

Version History

Introduced in R2019a