open
Open specified model, library, subsystem, or block
Description
open(
opens the specified model, library,
subsystem, or block. This is equivalent to double-clicking the model or library in the
Current Folder browser or the subsystem or block in the Simulink® Editor. bp
)
open(
opens
the specified model, library, subsystem, or block with additional options. bp
,Name,Value
)
Examples
Open Referenced Model in Context of Model Hierarchy
Open the project named ModelReferenceHierarchy
.
openProject("ModelReferenceHierarchy");
The project opens a model hierarchy with sldemo_mdlref_depgraph
as the top model.
Create a Simulink.BlockPath
object named bp
that represents a referenced model within the model hierarchy.
bp = Simulink.BlockPath(... {'sldemo_mdlref_depgraph/thermostat',... 'sldemo_mdlref_heater/Fahrenheit to Celsius'});
Open the referenced model specified by bp
in the context of the model hierarchy.
open(bp)
Open Referenced Model in New Window
Open the project named ModelReferenceHierarchy
.
openProject("ModelReferenceHierarchy");
The project opens a model hierarchy with sldemo_mdlref_depgraph
as the top model.
Create a Simulink.BlockPath
object named bp
that represents a referenced model within a model hierarchy.
bp = Simulink.BlockPath(... {'sldemo_mdlref_depgraph/thermostat',... 'sldemo_mdlref_heater/Fahrenheit to Celsius'});
Open the referenced model specified by bp
in a new window.
open(bp,'OpenType','new-window')
Input Arguments
bp
— Fully specified block path
Simulink.BlockPath
object
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
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: open(bp,'OpenType','new-window')
OpenType
— Option to open object in new tab or window
'current-tab'
(default) | 'new-tab'
| 'new-window'
Option to open object in a new tab or window, specified as the comma-separated
pair consisting of 'OpenType'
and 'current-tab'
,
'new-tab'
, or 'new-window'
. This option
determines whether the subsystem or model specified by a
Simulink.BlockPath
object opens in the current window and tab, a
new tab, or a new window, respectively.
Data Types: char
| string
Force
— Option to open object under block mask
'off'
(default) | 'on'
Option to open the object under the block mask, specified as the comma-separated
pair consisting of 'Force'
and 'off'
or
'on'
. When this argument is set to 'off'
, the
function opens the block mask. When this argument is set to 'on'
,
the function opens the dialog box of the block under the mask or opens the masked
system in a new tab, which is equivalent to the Look Under Mask
menu item. It forces the Simulink.BlockPath
object to open,
regardless of the block mask.
Data Types: char
| string
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)