필터 지우기
필터 지우기

How to disable RTW builds invoked by non-script means

조회 수: 2 (최근 30일)
Graham Fletcher
Graham Fletcher 2012년 7월 25일
I'm after preventing users from executing a code build via the built-in mechanisms (Ctrl-B shortcut, Build buttons in dialogs, etc), and forcing them to use a build script (which itself will call slbuild() or similar).
I can use the sl_customization() to disable individual commands, buttons, etc, but that is a bit hit and miss (e.g. select then deselect "Code generation only" and build button re-enables) and I can use either a STF or installation specific hook, but that isn't aware of how the build was invoked so I've only been able to look for telltales in the dbstack trace, which doesn't seem robust enough.
Can anyone suggest any other tricks I could use in a hook file, or any other means I could use to achieve this?
Thanks in advance, Graham

채택된 답변

Ryan G
Ryan G 2012년 7월 25일
You may be able to disable CTRL-B utilizing:
File -> Preferences -> Keyboard -> Shortcuts and un-assinging the CTRL+B command.
In terms of the buttons I think the sl_customization is the best option. I believe that Simulink will run ALL of the sl_customization files on the path when it opens, not just the first one like the setup.m file.
I do wonder why you have to try so hard to stop users from building code.

추가 답변 (1개)

Graham Fletcher
Graham Fletcher 2012년 7월 31일
Thanks Ryan.
Its not so much I want to stop users from building the code, just force them to build via a script that bundles many more activities together with the build.
I looks like this might not be possible to enforce, so they'll just have to remember!
Graham.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by