Main Content

getNearestParentSubsystemReferenceBlock

Returns the nearest parent subsystem reference for a block

Description

Simulink.SubsystemReference.getNearestParentSubsystemReferenceBlock(path) returns the nearest parent subsystem reference for a block.

Input Arguments

expand all

The path of the block for which the nearest parent must be returned. You can also specify the handle of the block.

Output Arguments

expand all

The path of the nearest parent subsystem reference for the given block is returned. If the given block is not inside any subsystem reference block, the output will be empty

Examples

>> Simulink.SubsystemReference.getNearestParentSubsystemReferenceBlock(gcb)

ans =

    'mdl1/Subsystem/Subsystem Reference'

Version History

Introduced in R2022a