Is it possible to add a custom button in the Simulink's model editor Explorer Bar

1 次查看(过去 30 天)
Hello,
Coworkers and I are looking for a way to add a custom button in the Explorer bar (The gray bar on the left of the Model Editor featuring a Zoom, Fit to View, Sample Time, ...).
The upper toolstrip would also be a good candidate if it's impossible to customize the Explorer bar.
Context :
We are building models that has many constraints/rules. The constraint's verifications are being automated via Scripts.
Ideal solution :
The general idea is to have a button that acts as an indicator that would always be present on the screen and change colour when a rule is broken. We want to have minimal impact on the designer's model therefore custom subsystem are out of the question. Clicking the button would lead to a list of broken rules with dynamic links to blocks that breaks a rule.
We already have the knowledge to build the button's callback, what we would like to know is :
  • Can we add a button to the Explorer bar ?
  • If we can't , can we add a button to the toolstrip ?
  • Can buttons change icon dynamically ?
Thank you for your time,
P Lepage.

采纳的回答

Fangjun Jiang
Fangjun Jiang 2020-9-18
This Edit time Model Advisor checking seems to be a good solution. Check the lastest version to see if it can be done on a customized (your own) Model Advisor check.
  5 个评论
P Lepage
P Lepage 2020-9-18
We are going to move foward using the feature you linked in your initial answer.
By the way, do you know of any way to notify a user when a general rule that does not involve any perticular block, but involves a model is broken ? We are looking for something visual that does not stop de design as a pop-up msgbox would.
We are considering using the diagnostic viewer but reporting an Error pops up a window (to avoid), and reporting a warning is not enough clear/obivous.
Fangjun Jiang
Fangjun Jiang 2020-9-18
I think I've seen a popup bar at the top of the Simulink model window. Sometimes it pops up to remind that the model is saved in an older version, remind to upgrade, etc. I have not figured out how it is done, or whether there is an API open to the user.
I can suggest to have a popup warning window once a while. The user can close it or it will close itself after a few seconds if the user does not take any action.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by