Configure Simulink to ask for new model version when saving the model
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ansh Gandhi
il 16 Ott 2020
Commentato: Ansh Gandhi
il 3 Nov 2020
Currently, Simulink can be configured to prompt for a comment each time a model is saved.
I do not want it to increment the version number on its own, so I have removed the AutoIncrement macro in the History section of Model properties.
Although, I would like to have the option of choosing the model version number along with the message each time when saving the model if possible so as to increment both major and minor releases at my own pace, conveniently, and without forgetting.
Currently using MATLAB 2017b
Thanks for the help!
0 Commenti
Risposta accettata
Urmila Rajpurohith
il 3 Nov 2020
This might be possible using model callbacks, but it would have to be added to every model manually, or to the default Simulink template.
EX:
open the model
set_param(bdroot, 'presavefcn', 'str=inputdlg;set_param(bdroot, ''ModelVersionFormat'', str{1})')
Più risposte (1)
Urmila Rajpurohith
il 23 Ott 2020
Hi
If you want to change the model version you can use "set_param" function before saving the model.
for example if you want to change the model version to 1.10, then you can use
set_param(modelname,'Modelversionformat','1.10')
Hope this helps!
3 Commenti
Urmila Rajpurohith
il 30 Ott 2020
Hi
Can you tell us more details about why you require this workflow?
because many people would use source control tool features to do this kind of tracking rather than depending on the user typing in information on each model save.
Vedere anche
Categorie
Scopri di più su Simulink Environment Customization 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!