Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Replacing a Simulink subsystem from command line

683 views
Skip to first unread message

John Öström

unread,
Nov 20, 2003, 4:29:35 AM11/20/03
to
Hello!

Is there a way to replace a whole subsystem (all blocks inside it included)
with one from a library or from another model ? I tried using replace_block
command but it only replaces blocks with ones in Simulink Library Browser.

Thanks for your help!

John


Christian Simard

unread,
Nov 20, 2003, 9:44:52 AM11/20/03
to
I John,

The most obvious way to do this is by creating a library that contain
your different subsystem. Then, you will be able to use the standard
Simulink function to add & replace any sub-system.

John Öström

unread,
Nov 21, 2003, 1:47:58 AM11/21/03
to
Hi!

I tried this allready but it didn't help. But I found out that using the
Name-property for the block (or a subsystem) that is to replaced helped. So
the command would be for example:

replace_block('Simulation', 'Name', 'Input', 'lib/Input2','noprompt')

This replaces the subsystem "Input" in Simulation.mdl with subsystem
"Input2" from model lib.mdl

John

"Christian Simard" <christia...@lyrtech.com> wrote in message
news:eecb...@webx.raydaftYaTP...

John Öström

unread,
Nov 21, 2003, 6:29:43 AM11/21/03
to
Another question came up from this. Is it possible to use
replace_block-command without opening the Simulink model(s) ?

John


"John Öström" <jostrom...@cc.hut.fi> wrote in message
news:bpkcel$78p$1...@epityr.hut.fi...

0 new messages