how to disable the CLI prompt to save simulink model before closing?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
try
% open/configure/run the model
catch
close_system(gcs,0)
end
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.
0 comentarios
Respuestas (1)
Uday Pradhan
el 7 de En. de 2021
Hi,
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.
0 comentarios
Ver también
Categorías
Más información sobre Programmatic Model Editing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!