Main Content

Simulink.MDLInfo.getDescription

R2026b

Extract SLX, SLXP, or MDL file description without loading file

Description

d = Simulink.MDLInfo.getDescription(file) returns the description of the specified SLX, SLXP, or MDL file without loading the file.

example

Examples

collapse all

Suppose you have a model on the MATLAB® path named myModel.

Get the model description without loading the model or creating a Simulink.MDLInfo object.

d = Simulink.MDLInfo.getDescription("myModel");

Input Arguments

collapse all

Name or file path of the SLX, SLXP, or MDL file, specified as a string or character vector. You can specify a full file path or a relative file path. When you do not provide a file path, the file extension is optional.

To avoid unexpected results caused by shadowed files that share a name, specify a fully qualified file name.

Example: Simulink.MDLInfo("myModel")

Example: Simulink.MDLInfo("myModel.slx")

Example: Simulink.MDLInfo("mydir/myModel.slx")

Example: Simulink.MDLInfo("C:/mydir/myModel.slx")

Data Types: string | character vector

Version History

Introduced in R2009b