How to change Simulink preferences on the fly?

11 visualizaciones (últimos 30 días)
Nagaraj
Nagaraj el 12 de Abr. de 2017
Respondida: ES el 12 de Abr. de 2017
Hi,
Is there a way to change Simulink Preferences for a model file from command line? I want to disable Auto Save option for a Simulink model before I simulate? I tried opening the model and using set_param(ModelName,'AutoSaveOptions',0). But it does not work (as there is no 'AutoSaveOptions' parameter)
Any help would be greatly appreciated.
Thanks in advance!

Respuesta aceptada

ES
ES el 12 de Abr. de 2017
AutoSave etc are not model properties. They are simulink properties (applicable to all simulink models). So you should use set_param(0, 'AutoSaveOptions',....)
example:
strucAutoSaveOptions.SaveBackupOnVersionUpgrade = 1;
strucAutoSaveOptions.SaveOnModelUpdate = 1;
set_param(0, 'AutoSaveOptions', strucAutoSaveOptions)

Más respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by