Thread Subject: Simulink: mass editing (background color) of block types?

Subject: Simulink: mass editing (background color) of block types?

From: Clemens Winkler

Date: 30 Jul, 2008 09:37:21

Message: 1 of 4

Hello group,

because my simulink model is very big and with a lot of subsystems I
want to use a "color schema", giving a all output ports the same
color, all input ports the same color and so on.

The model browser lets me search for block types. But I can't change
properties like colors. Isn't it possible to do that in the model
browser? (I use Matlab 7.1).

For any hints I would be appreciated.

Thanks & greetings,
Clemens

Subject: Simulink: mass editing (background color) of block types?

From: Titus

Date: 30 Jul, 2008 12:01:41

Message: 2 of 4


"Clemens Winkler" <ClemensWinkler@gmx.net> schrieb im Newsbeitrag
news:a6d9438f-7e28-46dc-8576-ad75b06b56d8@m36g2000hse.googlegroups.com...
> Hello group,
>
> because my simulink model is very big and with a lot of subsystems I
> want to use a "color schema", giving a all output ports the same
> color, all input ports the same color and so on.
>
> The model browser lets me search for block types. But I can't change
> properties like colors. Isn't it possible to do that in the model
> browser? (I use Matlab 7.1).
>
> For any hints I would be appreciated.
>
> Thanks & greetings,
> Clemens

Hi Clemens,

from commandline you could do this (e.g. for outports):

outports = find_system(yourModelName, 'BlockType', 'Outport');
for i=1:length(outports)
  set_param(outports{i},'BackgroundColor','yellow')
end

Titus


Subject: Simulink: mass editing (background color) of block types?

From: Fangjun Jiang

Date: 30 Jul, 2008 12:20:18

Message: 3 of 4

FYI

  If you add the 'FindAll','On' spec and return all block
handles, the for loop is not necessary. It should speed up
the process.

  The other things to consider is 'FollowLinks'
and 'LookUnderMasks'. If your model contains library
links, I suggest you doing this on library model file.

"Titus" <titus.edelhofer@mathworks.de> wrote in message
<g6pl76$dnl$1@fred.mathworks.com>...
>
> "Clemens Winkler" <ClemensWinkler@gmx.net> schrieb im
Newsbeitrag
> news:a6d9438f-7e28-46dc-8576-
ad75b06b56d8@m36g2000hse.googlegroups.com...
> > Hello group,
> >
> > because my simulink model is very big and with a lot
of subsystems I
> > want to use a "color schema", giving a all output
ports the same
> > color, all input ports the same color and so on.
> >
> > The model browser lets me search for block types. But
I can't change
> > properties like colors. Isn't it possible to do that
in the model
> > browser? (I use Matlab 7.1).
> >
> > For any hints I would be appreciated.
> >
> > Thanks & greetings,
> > Clemens
>
> Hi Clemens,
>
> from commandline you could do this (e.g. for outports):
>
> outports = find_system
(yourModelName, 'BlockType', 'Outport');
> for i=1:length(outports)
> set_param(outports{i},'BackgroundColor','yellow')
> end
>
> Titus
>
>

Subject: Simulink: mass editing (background color) of block types?

From: Clemens Winkler

Date: 30 Jul, 2008 16:35:05

Message: 4 of 4

Thank you guys. I will try your hints!

Greets, Clemens

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com