MATLAB Answers

Simulink Subsystems are grayed out and hard to read

6 views (last 30 days)
I have simulink models that are provided by my software engineers. When browsing them to view how the code is formatted, some of them go "gray" below a certain level. This makes it much harder to read the code provided in the functions. Here is an example of the "gray" or "faded" text
Below is an example of similar text at a higher level. While it's not too hard to read either right now, when it gets to stateflow stuff, the contrast is really gone.
What's causing this, can I change it? I've tried searching, but all the terms I use keep going to signal manipulation, not just visual representation issues.

  0 Comments

Sign in to comment.

Accepted Answer

Bhargavi Maganuru
Bhargavi Maganuru on 28 Apr 2020
Hi,
This can happen when blocks are commented.You can uncomment by right click on block and select uncomment.

  2 Comments

Smattering_Applause
Smattering_Applause on 28 Apr 2020
I took a look at doing this. On a function that was not already grayed out I selected Comment Out and it went to the same gray. I then right clicked it again and it changed to show Uncomment which I clicked and it went back. Annoyingly, everything that is grayed in the model I have doesn't show Uncomment as an option. Additionally, that only works for blocks and not the inputs or outputs which are also grayed in the model I have.
When I try to comment out blocks that were always gray I get the error "Commenting out of the following block(s) is not supported:" which is the same error I get when trying to comment out an input or output to a block.
What other things can make stuff gray?
Smattering_Applause
Smattering_Applause on 28 Apr 2020
Update: I think I found the reason. All simulink that I looked at went gray when it got to the level where they split to different variants. The error reads like "Variant control 'Block Name' of variant block 'subsystem page name' must be a condition expression or name of a Simulink.Variant object in the global scope workspace of the model. Ensure that the condition does not match the model name."
Once I loaded the expression config file to my workspace then opened the simulink model, everything that I wanted to be able to read better was readable. Basically Variant blocks sort of automatically comment out sections that aren't activated by configs.

Sign in to comment.

More Answers (0)