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

7 ビュー (過去 30 日間)
Jonas
Jonas 2019 年 7 月 23 日
コメント済み: Fangjun Jiang 2019 年 7 月 24 日
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

採用された回答

Fangjun Jiang
Fangjun Jiang 2019 年 7 月 23 日
  2 件のコメント
Jonas
Jonas 2019 年 7 月 24 日
編集済み: Jonas 2019 年 7 月 24 日
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 2019 年 7 月 24 日
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.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by