- Right click on the block, select "Properties".
- Select the callbacks tab.
- Click on OpenFcn
- Enter your code, maybe change to e.g.
How to change default action of a subsystem?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mel
el 11 de Jun. de 2014
Comentada: Mel
el 11 de Jun. de 2014
Hi,
I have a model with several subsystems, each with a several scopes. The default action of double clicking on the subsystem is to open the subsystem to view the blocks inside.
However, I would like to change the default action to opening the scopes inside by using the code:
open_system('Model/Subsystem/Scope')
This is similar to all the example codes with Simulink, where double-clicking on the "?" button the documentation of that model opens.
Thank you!
0 comentarios
Respuesta aceptada
Titus Edelhofer
el 11 de Jun. de 2014
Hi,
do the following:
open_system([bdroot '/Subsystem/Scope'])
in case someone would like to rename the model. Or use gcs/gcb appropriately.
Titus
2 comentarios
Más respuestas (1)
Ilham Hardy
el 11 de Jun. de 2014
Perhaps something like this?
open_system([gcb '/Scope'])
Put it in your submodel OpenFcn callback. (Right click->properties->callback->OpenFcn)
Ver también
Categorías
Más información sobre Subsystems en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!