Main Content

Stateflow.exportToVersion

Export standalone chart for use in previous version of Stateflow

Since R2020a

Description

example

exported_file = Stateflow.exportToVersion(source,file_name,version) exports the chart source to a file named file_name in a format that the specified previous Stateflow® version can load. You can only export to R2019a and later releases.

Examples

collapse all

To complete the export process, you need access to the versions of Stateflow from which and to which you are exporting.

Using the later version of Stateflow, convert the standalone chart chart.sfx.

edit chart.sfx
Stateflow.exportToVersion("chart","chart_19a.sfx","R2019a")

Using the earlier version of Stateflow, open and resave the exported chart.

edit chart_19a.sfx
sfsave chart_19a

Input Arguments

collapse all

Chart to export, specified as a string scalar or character vector, without any file extension. The chart must be open in the Stateflow Editor and have no unsaved changes.

Example: "chart"

Data Types: char | string

Exported file name, specified as a string scalar or character vector. The exported file must not have the same name as the source chart.

Example: "chart_19a.sfx"

Data Types: char | string

MATLAB release name, specified as a string scalar or character vector. Release names are case sensitive. You can only export to R2019a and later releases.

Output Arguments

collapse all

Absolute path to exported file, returned as a character vector.

Tips

Attempting to execute an exported chart before resaving it will result in an error.

Version History

Introduced in R2020a