How to reorganize blocks programmatically based on another block.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I am trying to organize a model programmatically. Basically I want to reposition all the Inports/outports of a subsystem with respect to the inputs and outputs of a subsystem block. Here is an example of what I am trying to accomplish. Does anyone now of a simple way to do so?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191673/image.jpeg)
Thank you very much in advance
0 commentaires
Réponses (2)
Mark McBroom
le 5 Juil 2018
You will need to write MATLAB code that uses find_system() to locate the subsystem, inports and outports, and then get_param(gcbh,'Position')/set_param(gcbh,'Position', ...) to obtain and change their location on the canvas.
0 commentaires
Voir également
Catégories
En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!