Simulink.data.dictionary.getOpenDictionaryPaths
Return file names and paths of open data dictionaries
Syntax
Description
returns the file names and paths of all data dictionaries that are open. For example, a data dictionary is open if you create objects, such asopenDDs
= Simulink.data.dictionary.getOpenDictionaryPathsSimulink.data.Dictionary
, that refer to the dictionary. If you open two or more dictionaries that have the same file name but different file paths, this function returns multiple file paths.
Before executing commands and functions that cannot operate when dictionaries are open, use this function to identify open dictionaries so that you can close them. For example, when you run parallel simulations as described inSweep Variant Control Using Parallel Simulation, this function helps you identify open dictionaries before executing the commandSimulink.data.dictionary.cleanupWorkerCache
。
returns the file paths of data dictionaries that have the file nameopenDDs
= Simulink.data.dictionary.getOpenDictionaryPaths(dictFileName
)dictFileName
。如果你打开two or more dictionaries that have the same file name but different file paths, you can use this syntax to return all of the file paths.
Examples
Input Arguments
Output Arguments
Tips
数据词典是开放的any of these conditions are true:
The dictionary appears as a node in theModel Hierarchypane of the Model Explorer. To close this connection to the dictionary, right-click the node in Model Explorer and selectClose。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.