open_system
Open model, library, subsystem, or block dialog box
Syntax
Description
open_system(
opens the specified model, library, subsystem, or block.obj
)
A model or library opens in a new window. For a subsystem or block within a model, the behavior depends on the type of block and its properties.
Any
OpenFcn
callback for the block or model is evaluated.If block or model has no
OpenFcn
callback, and a mask is defined, the mask parameter dialog box opens.Without an
OpenFcn
callback or a mask parameter, the software opens the object.A referenced model opens in a new window.
Tip
To open the referenced model in the context of a model hierarchy, use the
open
function with aSimulink.BlockPath
object.A subsystem opens in a new tab in the same window.
For blocks, the Block Parameters dialog box for the block opens.
To open a specific subsystem or block, you must load the model or library that contains the block. Otherwise the software issues an error.
You can override the default behavior by specifying more than one input argument. The following are valid combination of arguments:
Using
Force
withTab
orWindow
allows you to look under the mask of a block in a new window or a new tab.Using
ActiveChoice
withTab
orWindow
opens the active choice of a Variant Subsystem block in a new tab or a new window. If one of the arguments isActiveChoice
, then the content inside a masked active choice is opened by passingForce
as another argument along withTab
orWindow
.
The following combinations of input arguments will error out.
If you specify arguments
parameter
,mask
, andOpenFcn
with any other argument exceptActiveChoice
.If you specify
ActiveChoice
on any other block other than a Variant Subsystem block.If you specify
force
with any other argument other thanActiveChoice
,window
, ortab
.If you specify both
window
ortab
as arguments.If you specify
loadonly
with any other argument.
open_system(
loads
the specified model or library without opening the Simulink® Editor. Using this syntax is equivalent to calling the sys
,"loadonly")load_system
function.
open_system(
opens the subsystem sbsys
,"window")sbsys
in a new Simulink Editor window. Before opening a specific subsystem or block, load
the model or library that contains the subsystem or block. Otherwise the
software issues an error.
open_system(
opens the subsystem in a new tab in the same Simulink Editor window. Before opening a specific subsystem or block, load
the model or library that contains the subsystem or block. Otherwise the
software issues an error.sbsys
,"tab")
open_system(
opens the mask dialog box of the block or subsystem specified by
blk
,"mask")blk
. Load the model or library that contains
blk
before opening it.
open_system(
looks under the mask of a masked block or subsystem. This syntax opens the
dialog box of the block under the mask or opens a masked subsystem in a new tab
in the Simulink Editor. Using this syntax is equivalent to the Look
Under Mask menu item. Before opening a specific subsystem or
block, load the model or library that contains the subsystem or block.
Otherwise, the software issues an error.blk
,"force")
open_system(
opens the Block Parameters dialog box.blk
,"parameter")
open_system(
runs the blk
,"OpenFcn")OpenFcn
callback for the block
blk
.
open_system(
opens the active choice of the Variant Subsystem in a new
window.vssblk
,"ActiveChoice","window")
Examples
Input Arguments
Tips
To open a referenced model in the context of a model hierarchy, use the open
function with a Simulink.BlockPath
object.
Version History
Introduced before R2006a
See Also
new_system
| load_system
| close_system
| save_system
| open
(BlockPath)