How can I remove the hook added by "addUserHook" in Simulink

7 ビュー (過去 30 日間)
Twols
Twols 2013 年 7 月 5 日
Hello!
I'm adding a hook in sl_customization.m for the rtw building action.
% Get default (factory) customizations
hObj = cm.RTWBuildCustomizer;
% Register Real-Time Workshop build process hooks
hObj.addUserHook('entry', 'buildProject(modelName, true)');
When I'm switching to an other Project, the hook is stil in simulink. Can I remove the hook somehow?

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2013 年 7 月 8 日
I'm guessing that happens because your sl_customization.m file is on the MATLAB path. You need to either add the hook conditionally only for the desired projects, or remove it from the MATLAB path when you don't want it.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by