Effacer les filtres
Effacer les filtres

How can I trigger Stateflow's "Arrange Automatically" via the API?

12 vues (au cours des 30 derniers jours)
Alex Hirzel
Alex Hirzel le 19 Jan 2023
Commenté : Alex Hirzel le 27 Jan 2023
You can arrange a Stateflow chart within the editor by using Ctrl+Shift+A to "Arrange Automatically". How can I trigger this functionality when programmatically generating a Stateflow chart? For instance, the analogous feature in Simulink can be accessed from MATLAB via the Simulink.BlockDiagram.arrangeSystem function.

Réponses (1)

Kunal Kandhari
Kunal Kandhari le 19 Jan 2023
I am not aware of ways to align or distribute blocks programmatically but, starting MATLAB 2018b you can use Simulink.BlockDiagram.arrangeSystem(system) from your MATLAB command window to automatically arrange your model.
Please see the section titled Arrange Model Layouts Automatically in this help document.
  1 commentaire
Alex Hirzel
Alex Hirzel le 27 Jan 2023
Unfortunately, this does not work for Stateflow charts.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Complex Logic dans Help Center et File Exchange

Tags

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by