close_system
R2026bClose Simulink model window or Block Parameters dialog box
Syntax
Description
close_system closes the current system, subsystem, or Block Parameters
dialog box. Use the gcs function to determine the current system. If
the current system is the top-level model and has been modified, the function returns an
error.
Note
Using the close_system function in a block or menu callback to close
the root-level model is not supported. Attempting to close the root-level model in a block or
menu callback causes an error and discontinues the callback execution.
Tip
When you close a model with the close_system function, the model is
no longer loaded. To close a model but keep the model loaded, use this command instead, where
mdl is the handle or name of the
model.
set_param(mdl,Open="off")close_system
or bdclose function.
close_system( closes the specified
model or subsystem, or the Block Parameters dialog box of the specified block. If the block has
a mask, this syntax closes the mask dialog box. If the model was only loaded, this syntax clears
the model from memory.blockOrSys)
close_system(
specifies additional options using one or more sys,___,Name=Value)Name=Value pair
arguments.