How to export a Simulink model to a text-based format in R2024b?

14 views (last 30 days)

I am trying to export a Simulink model for integration into a downstream engineering tool. The model contains structural information (system decomposition into subsystems and components) as well as behavioral models (logic, sequences, functions, etc.). The Simulink model was provided by a third party, and I need to translate it into a SysML v1 or SysML v2 model. For this, I need the Simulink model data in a programmable format.
Structural information is the top priority. Extracting some behavioral model data would be beneficial as well, but not a necessity. However, it would be helpful to have a way to parse or view behavioral elements such as logic and functions.
Is there an export format (preferably text-based), or an API, that allows navigation of the Simulink model object tree and parsing it with an external tool for use in model analytics?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 3 Jul 2025
One possible solution is to first export the Simulink model to an architecture model, followed by converting it to a SysML model. You can try exporting your Simulink model into an architecture model, using 'Save -> Drop-Down list -> Export Model to -> Architecture Model', as shown in the screenshot below:
If you do not see the 'architecture model' option in your version of Simulink, please try the 'systemcomposer.extractArchitectureFromSimulink' API for accomplishing the same thing.
If the exported architecture model has all the information that is required for your goals, the next step would be to request for the 'SysML Connector' support package.
Once you have requested this support package, someone from the MathWorks team will reach out to you and support you with converting the architecture model into a SysML model.

More Answers (0)

Categories

Find more on Manage Design Data in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!