Open SimulinkProject along with model

4 Ansichten (letzte 30 Tage)
Sunny Talekar
Sunny Talekar am 20 Mär. 2019
Kommentiert: Sunny Talekar am 26 Okt. 2021
Hi,
When you attempt to open a model that is part of a Simulink project, Simulink asks you whether you want to open the project as well. Is there a way to do the same when the model is opened programmatically? I'm trying to implement a mechanism/process where the user selects a model to open and if it is part of a project, the project gets opened so that it configures the environment - paths, variables, etc.
Cheers,
sunny

Antworten (1)

Akshay Khadse
Akshay Khadse am 28 Mär. 2019
I am ssuming that you are using open_system command to open the model file. However, this command cannot open the Simulink Project.
You will need to manually use the openProject command to open the corresponding project. Please refer the following documantation page for more inormation on this command:
  1 Kommentar
Sunny Talekar
Sunny Talekar am 26 Okt. 2021
So how does Simulink do it when you try to open a model? Is there a way to replicate the same behaviour? For instance, I'm trying to open and simulate a model via command line using simulink model path. The project essentially sets up the environment for the model to run. If I only have the simulink model path how can I identify the project to load before attempting to simulate the model?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Dependency Analysis finden Sie in Help Center und File Exchange

Produkte


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by