Contenu principal

open

R2026b

Open specified model, library, subsystem, or block

Description

open(bp) opens the specified model, library, subsystem, or block. This is equivalent to double-clicking the model or library in the Files panel or the subsystem or block in the Simulink® Editor.

example

open(bp,Name=Value) opens the specified model, library, subsystem, or block with additional options.

example

Examples

collapse all

Suppose you have a Simulink.BlockPath object named bp that represents a Model block in a model hierarchy.

Open the referenced model specified by bp in the context of the model hierarchy.

open(bp)

For information on how to create a Simulink.BlockPath object, see Simulink.BlockPath.

Suppose you have a Simulink.BlockPath object named bp that represents a Model block in a model hierarchy.

Open the referenced model specified by bp in a new window.

open(bp,OpenType='new-window')

For information on how to create a Simulink.BlockPath object, see Simulink.BlockPath.

Input Arguments

collapse all

Fully specified block path, specified as a Simulink.BlockPath object. This block path uniquely identifies a block within a model hierarchy, even when the model hierarchy references the same model multiple times.

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: open(bp,OpenType='new-window',Force=true)

Option to open object in a new tab or window, specified as 'current-tab', 'new-tab', or 'new-window'.

  • 'current-tab' — Open in the current window and tab.

  • 'new-tab' — Open in a new tab.

  • 'new-window' — Open in a new window.

Data Types: char

Option to open the object under the block mask, specified as false or true.

  • false — Open the block mask.

  • true — Open the dialog box of the block under the mask or open the masked system in a new tab. This option is equivalent to Look Inside Mask.

Data Types: logical

Version History

Introduced in R2019a

See Also

Objects

Functions