sl_customization not refreshing Simulink Library Broswer

8 ビュー (過去 30 日間)
Leonid Guerchkovitch
Leonid Guerchkovitch 2021 年 12 月 9 日
編集済み: Suman 2024 年 2 月 15 日
Hello,
I've created a simple sl_customization file to hide certain blocks in the general Simulink library view. When I call the function and run the sl_refresh_customizations command in the prompt, the below blocks are still displayed.
Using the command which sl_customization shows that the file path is correct and points to the one that I had created.
Additionally, running the command sl_customization(cm) generates an error "Unrecognized function or variable 'cm'."
Is there something that I misunderstanding in the use of the function or the file structure?
Thank you for your help.
function sl_customization(cm)
cm.LibraryBrowserCustomizer.applyFilter({'simulink/Commonly Used Blocks/Bus Creator','Hidden'});
cm.LibraryBrowserCustomizer.applyFilter({'simulink/Commonly Used Blocks/Bus Selector','Hidden'})
end

回答 (1 件)

Suman
Suman 2024 年 2 月 15 日
編集済み: Suman 2024 年 2 月 15 日
Hi Leonid,
As per my understanding, you want to hide some blocks from the Simulink Library view using a custom "sl_customization" file and when you run the "sl_customization" function, you are getting the error: "Unrecognized function or variable 'cm'."
You are getting this error because the customization manager object (cm) is not available in that context. Please note that you do not need to explicitly call the "sl_customization" function. When you run the "sl_refresh_customizations" command, it searches the MATLAB path for all available "sl_customization.m" files and executes them.
Hence, in order to any kind of customizations, you may follow these steps:
  • write an "sl_customization" function wherein you specify your customizations
  • add the "sl_customization.m" file to the MATLAB path
  • run the "sl_refresh_customizations" command at the MATLAB command line
I hope that helps!

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by