Main Content

batchApplyStereotype

Apply stereotype to all elements in specified architecture

Description

example

batchApplyStereotype(architecture,elementType,stereotype) applies the stereotype to all elements that match the elementType within the architecture.

batchApplyStereotype(architecture,elementType,stereotype,'Recurse',flag) applies the stereotype to all elements that match the elementType within the architecture and its sub-architectures.

Examples

collapse all

Apply the standardConn stereotype in the GeneralProfile profile to all connectors within the architecture arch.

batchApplyStereotype(arch,'Connector','GeneralProfile.standardConn');

Input Arguments

collapse all

Architecture model element, specified as a systemcomposer.arch.Architecture object. Parent architecture layer for all components to attach the stereotype.

Type of architecture element to apply the stereotype, specified as a character vector of 'Component', 'Port', 'Connector', or 'Instance'. The stereotype must be applicable for this element type.

Data Types: char

Stereotype to apply, specified as a character vector in the form '<profile>.<stereotype>'. The stereotype must be applicable to components.

Data Types: char

Apply stereotype recursively, specified as a logical or numeric value. If flag is 1 (true), the stereotype is applied to the elements in the architecture and its sub-architectures.

Data Types: logical

Introduced in R2019a