How to Center a Specific Block in the Simulink Window

8 vues (au cours des 30 derniers jours)
長谷川
長谷川 le 4 Mar 2025
I want to set the ZoomFactor of the Simulink window to 100, centering on a specific block.
I have tried various highlighting methods such as hilite_system and set_param(gcb, 'HiliteAncestor', 'find'), but none have yielded satisfactory results.
While it is possible to set the optimal zoom level using set_param(gcs, 'ZoomFactor', 'fit'), I want to emphasize a specific block by centering on it and setting the ZoomFactor to 100.

Réponses (1)

Divyajyoti Nayak
Divyajyoti Nayak le 7 Mar 2025
Modifié(e) : Divyajyoti Nayak le 7 Mar 2025
I've found two ways to zoom through a Simulink window while centering on a specific block:
  1. Select the entire model and drag the specific block to the center, then select the block and with cursor still on the block, scroll using the mouse wheel to zoom until you get to the desired zoom factor.
  2. On the left of the 'Model Browser' panel is the 'Explore Bar', drag the zoom tool icon to the specific block and it will centerthe view to that block. You can then use the keyboard shortcuts 'Ctrl +' and 'Ctrl -' to zoom in and out while being centered on the block.
Here's the documentation from which I found this out:
Hope this is what you were looking for.

Catégories

En savoir plus sur Interactive Model Editing dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by