open_system
Open model, library, subsystem, or block dialog box
Syntax
Description
open_system(
opens the specified model, library, subsystem, or block.obj)
Note
Security Considerations: Before you
open the model using open_system, make sure you
trust the sender or the author of the model. Models from unknown sources
might contain unsafe content. Unknown sources include models you clone
from a remote repository, download, or receive as an archive.
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
OpenFcncallback for the block or model is evaluated.If block or model has no
OpenFcncallback, and a mask is defined, the mask parameter dialog box opens.Without an
OpenFcncallback 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
openfunction with aSimulink.BlockPathobject.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
ForcewithTaborWindowallows you to look under the mask of a block in a new window or a new tab.Using
ActiveChoicewithTaborWindowopens 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 passingForceas another argument along withTaborWindow.
The following combinations of input arguments will error out.
If you specify arguments
parameter,mask, andOpenFcnwith any other argument exceptActiveChoice.If you specify
ActiveChoiceon any other block other than a Variant Subsystem block.If you specify
forcewith any other argument other thanActiveChoice,window, ortab.If you specify both
windowandtabas arguments.If you specify
loadonlywith 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)