필터 지우기
필터 지우기

sl_customization not refreshing Simulink Library Broswer

조회 수: 6 (최근 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 CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by