Command to 'Goto' a position in simulink window.

7 views (last 30 days)
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?

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 16 Sep 2011
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 Comments
Fangjun Jiang
Fangjun Jiang on 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 on 14 Mar 2012
TAB, could you please post your example code using 'ZoomFactor' and 'ScrollbarOffset'?

Sign in to comment.

More Answers (0)

Categories

Find more on Schedule Model Components in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!