Azzera filtri
Azzera filtri

how to disable the CLI prompt to save simulink model before closing?

15 visualizzazioni (ultimi 30 giorni)
I'm calling simulink through non-GUI shell. Any error or interruption of the model (eg. Ctrl+c) seems to bring up an infinite and difficult-to-interrupt-over-remote-session prompt of the form:
----- Save "simulink_model" before closing? -----
1) Yes
2) No
3) Cancel
because i've made changes to the model configuration settings. I would like to just completely disable this behavior in the terminal wihtout disabling auto-save features in the GUI editor. I have statements like
% open/configure/run the model
to avoid this prompt from inside matlab, but those don't handle interruption of the matlab process from the shell.
This has probably been asked before, but I can't find it based on what i'm querying.

Risposte (1)

Uday Pradhan
Uday Pradhan il 7 Gen 2021
If you want to save your changes, may be you could use "save_system" command in your try block. In this way, when you close the model, the prompt to save the model should no longer appear. You could also check out the "bdclose" command to close the model from command line, this doesn't trigger the Save model dialog but reverts unsaved changes.


Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by