Main Content

applyProfile

Apply profile to model

Description

applyProfile(model,profileFile) applies a profile to an architecture model and makes all the constituent stereotypes available.

example

applyProfile(dictionary,profileFile) applies a profile to a data dictionary and makes all the constituent stereotypes available.

applyProfile(allocSet,profileFile) applies a profile to an allocation set and makes all the constituent stereotypes available.

applyProfile(model,profileFile,Name=Value) specifies additional options using one or more name-value arguments.

Examples

collapse all

Create a model.

model = systemcomposer.createModel("archModel");

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

Input Arguments

collapse all

Architecture model, specified as a systemcomposer.arch.Model object.

Data dictionary, specified as a systemcomposer.interface.Dictionary object. For information on how to create a data dictionary, see createDictionary.

Allocation set, specified as a systemcomposer.allocation.AllocationSet object.

Name of profile, specified as a character vector or string.

Example: "SystemProfile"

Data Types: char | string

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: applyProfile(model,profileFile,IncludeReferenceModels=true)

Option to apply profile to all referenced component models, specified as a logical.

Example: applyProfile(model,profileFile,IncludeReferenceModels=true)

Data Types: logical

More About

collapse all

Version History

Introduced in R2019a