How to set the Model History information programmatically?

8 visualizaciones (últimos 30 días)
The Model Properties > History tab allows you to uncheck "Read Only" and then make modifications to the "Created by" and "Last saved by" fields (as well as the others).
Programmatically, the following code should change the field,
set_param(sys, 'LastModifiedBy', 'Ada');
however this error is thrown:
How can these model parameters be changed? Is there a way to programmatically unset the "Read Only" flag?

Respuesta aceptada

Monika Jaskolka
Monika Jaskolka el 21 de Feb. de 2018
I ended up contacting Matlab Support for this.
Some of these parameters are formatted based on another parameter. While the LastModifiedBy, LastModifiedDate , and ModelVersion parameters are read-only, you can change their values by changing their corresponding "format" parameters.
For instance, to change the name of who modified the model last, i.e, the LastModifiedBy parameter, you must modify ModifiedByFormat and save the model for the change to affect the LastModifiedBy parameter.
set_param(sys, 'ModifiedByFormat', 'Ada')
save_system(sys)
A summary of how to change all the values in the Model information section of the model properties is given in the table.
  4 comentarios
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar el 3 de Jul. de 2020
Hello Monika,
is there any way to set the model workspace programatically?
Thanks,
V. Ajay Krishna

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Subsystems 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