inlineComponent

Inline reference architecture into model

Description

example

componentObj = inlineComponent(component,inlineFlag) makes contents of the architecture model inline, referenced by the specified component and breaks the link to the reference model. If inlineFlag is false, then the contents are removed and only interfaces remain.

Examples

collapse all

Save the component robotcomp in the architecture model Robot.slx and reference it from another component, robotArm so that robotArm uses the architecture of robotcomp. Inline robotcomp so that its architecture can be edited independently.

saveAsModel(robotcomp,'Robot');
linkToModel(robotArm,'Robot');
inlineComponent(robotArm,true);

Input Arguments

collapse all

Architecture component linked to an architecture model, specified as a systemcomposer.arch.Component object.

Control contents of inlined component, specified as 1 (true) if contents of the referenced architecture model are copied to the component architecture, and 0 (false) if the contents are not copied and only ports and interfaces are inlined. If the component is a Simulink® behavior, inlineFlag is ignored and set to false.

Data Types: logical

Output Arguments

collapse all

Architecture component, returned as a systemcomposer.arch.Component object.

Introduced in R2019a