Simulink.data.dictionary.closeAll
Close all connections to all open data dictionaries
Syntax
Description
Simulink.data.dictionary.closeAll
attempts
to close all connections to all data dictionaries that are open. For
example, if you create objects, such as Simulink.data.Dictionary
,
that refer to a dictionary, that dictionary is open.
Some commands and functions, such as Simulink.data.dictionary.cleanupWorkerCache
,
cannot operate when dictionaries are open. It is a best practice to
close each connection individually by using functions and methods
such as the close
method
of a Simulink.data.Dictionary
object. To find dictionaries
that are open, use Simulink.data.dictionary.getOpenDictionaryPaths
.
However, you can use this function to close all connections to all
dictionaries.
You can also use this function to close dictionaries in a shutdown script that is part of a project.
Simulink.data.dictionary.closeAll(
closes
all connections to the dictionary named dictFileName
)dictFileName
.
If you open multiple dictionaries that use this file name (for example,
if the dictionaries have different file paths), the function closes
all connections to all of the dictionaries.
You cannot specify dictFileName
as a full
file path such as 'C:\temp\myDict.sldd'
.
Simulink.data.dictionary.closeAll(___,
closes
all connections to the target dictionaries by discarding or saving
unsaved changes. You can choose whether to save or discard all changes
to all of the target dictionaries.unsavedAction
)
Examples
Input Arguments
Tips
A data dictionary is open if any of these conditions are true:
The dictionary appears as a node in the Model Hierarchy pane of the Model Explorer. To close this connection to the dictionary, right-click the node in Model Explorer and select Close. Alternatively, use the
hide
method of aSimulink.data.Dictionary
object.You created an object of any of these classes that refer to the dictionary:
Simulink.data.Dictionary
Simulink.data.dictionary.Section
Simulink.data.dictionary.Entry
To close these connections to the dictionary, use the
close
method of theSimulink.data.Dictionary
object or clear the object. Clear theSimulink.data.dictionary.Section
andSimulink.data.dictionary.Entry
objects.A model that is linked to the dictionary is open. To close this connection to the dictionary, close the model.
Version History
Introduced in R2016a