Need to run sl_refresh​_customiza​tions each time I open my Simulink project

5 visualizzazioni (ultimi 30 giorni)
Hi
I have created a custom target for my Simulink Embedded Coder code generation. The target is stored in a Target file inside the Simulink Project.
Now each time I open my Simulink Project, the Configuration Settings complain about my custom Target not being registered. A solution is to run the command sl_refresh_customizations after which everything runs fine again with the custom Target.
My question is: why do I need to run sl_refresh_customizations each time I open my Simulink Project? Is there another solution? I have put the command in a start-up script as of now but I think it is not so clean.
With kind regards,
Jonas

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 23 Lug 2019
  2 Commenti
Jonas
Jonas il 24 Lug 2019
Modificato: Jonas il 24 Lug 2019
The documentation says that the command sl_refresh_customizations needs to run if I change sl_customization.m, but I am not changing it (I also never made such a file). Why do I need to run the command each time?
Is it because the Simulink Configuration menu does not know my custom target, and a side-effect is that the Simulink Editor menus are rebuilt after which it does recognize it?
Fangjun Jiang
Fangjun Jiang il 24 Lug 2019
The usual way is to create your target file, register it in a sl_customization.m file and put the files in the MATLAB path. All the sl_customization.m files are searched and executed when MATLAB is started. Your didn't do that but your model is using your customized target file. That is why you need to run the manual step or put it in startup.
Target file is regarded as a type of "system configuration". Every person/model/project using your installation of MATLAB will be able to pick this target once it is registered. You could continue using the manual approach if it is only used by this project.
Run "which -all sl_customization.m", you may see none or multiple files depending on your system.

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by