Command to 'Goto' a position in simulink window.

Is there any command line function to goto a position i.e. focus at a fosition in simulink window?
My model is very big. I have position of all Inports and outports using get_param. Suppose I want goto position of a port (say Position: [90 513 120 527]) and scroll to this position of model. Is it possible to do programically?

 Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 16 Sep. 2011

0 Stimmen

I am not aware any method for that. Maybe you can try something else.
Instead of getting and remembering all the positions, as long as you know the Inport/Outport name, you can use find_system() to find that particular Inport/Outport block.
Then you can use hilite_system(BlockPath) to highlight that block so it's easy to find. There is different scheme for highlighting. I use hilite_system(BlockPath,'find') and hilite_system(BlockPath,'none') to reset it.
Some other tips for browsing a huge model. Click an empty space in the model (don't double click thought because it will make an annotation),
press key 'F' to make view fit for window
press key 'R' to zoom in
press Key 'V' to zoom out
press Key 'E' to move up
press Key 'C' to move down
press Key 'G' to move left
press Key 'B' to move right

3 Kommentare

TAB
TAB am 16 Sep. 2011
Thanks for answer Jiang.
Actually I want to scroll to the position and focus on a block.
In between time, i found the two properties of model 'ZoomFactor' and 'ScrollbarOffset'. Using these i am able to scroll to a particular position.
It is also good to highlight the port for good focus. So i also implemented highlighting using 'hilite_system'.
Thanks again.
Fangjun Jiang
Fangjun Jiang am 16 Sep. 2011
Very nice! Thank you for letting me know too! Now I know I could use those in the future.
K E
K E am 14 Mär. 2012
TAB, could you please post your example code using 'ZoomFactor' and 'ScrollbarOffset'?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Schedule Model Components finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by