Main Content

Simulink.data.dataSource.getSourceNames

Get list of all external data sources associated with model

Since R2024b

Description

sourceNames = Simulink.data.dataSource.getSourceNames(modelName) retrieves list of all the external data sources, such as a MAT file or a data dictionary, that are currently associated with the Simulink® model or Subsystem File specified by modelName.

example

Examples

collapse all

Get the list of external data sources from the model BasicModellingData.

sourceNames = Simulink.data.dataSource.getSourceNames("BasicModellingData")
sourceNames = 

   "BasicModellingDataDefinitions.mat"

Get the list of external data sources associated with the Subsystem File SSREF1.

sourceNames = Simulink.data.dataSource.getSourceNames("SSREF1")
sourceNames = 

   "myDictionary.sldd"

Input Arguments

collapse all

Path or handle of a model or subsystem file, specified as a character vector or string.

Example: "myModel"

Data Types: char | string

Output Arguments

collapse all

List of external data sources, returned as a string or an array of character vectors.

Data Types: char | string

Alternatives

Use Model Explorer to navigate to the External Data tab. Under Additional data sources, you can see the list of data sources associated with the model.

Version History

Introduced in R2024b