Main Content

isReference

Determine component reference to another model

Description

flag = isReference(compObj) determines whether or not the component is a reference to another model.

example

Examples

collapse all

Find whether or not the component is a reference to another model.

This component is not a reference.

model = systemcomposer.createModel("archModel");
systemcomposer.openModel("archModel");
rootArch = get(model,"Architecture");
newComponent = addComponent(rootArch,"newComponent");
flag = isReference(newComponent)
flag =

  logical

   0

This component is a reference.

model = systemcomposer.createModel("archModel");
systemcomposer.openModel("archModel");
rootArch = get(model,"Architecture");
newComponent = addComponent(rootArch,"newComponent");
createSimulinkBehavior(newComponent,"newModel");
flag = isReference(newComponent)
flag =

  logical

   1

Input Arguments

collapse all

Output Arguments

collapse all

Whether component is reference, returned as 1 (true) or 0 (false).

Data Types: logical

More About

collapse all

Version History

Introduced in R2019a