Hauptinhalt

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,IncludeReferenceModels=flag) specifies whether to include reference models for a model model.

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

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