필터 지우기
필터 지우기

Disable Buttons in toolstrip on Simulink

조회 수: 5 (최근 30일)
suraj mate
suraj mate 2024년 2월 4일
댓글: suraj mate 2024년 2월 5일
hi i have added my custom tab and in that i have my custom toolstrip and also custom buttons.
i have added these buttons using json file like
{
"version": "1.0",
"entries": [
{
"type": "Action",
"id": "Demo Button",
"text": "Connect",
"description": "Connect to API",
"icon": "loginIcon",
"command": "login",
"commandType": "Script"
},
{
"type": "Action",
"id": "requirementPopUpAction",
"text": "MyDemo",
"icon": "DemoIcon"
}
}
which create buttons like this
----------------------------
but now i want to disable these buttons how can i do that i got some refrences like this but i dont know how to access CM and what is CM and also what should be callbackInfo in may case.
function sl_customization(cm)
cm.addCustomFilterFcn('Simulink:NewModel',@myFilter);
end
function state = myFilter(callbackInfo)
state = 'Disabled';
end
  댓글 수: 2
Anjaneyulu Bairi
Anjaneyulu Bairi 2024년 2월 4일
Hi,
Create a file sl_customization.m then add it to your path and run that file.
Hope it helps.
suraj mate
suraj mate 2024년 2월 5일
thanks got the solution

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by