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?

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 9월 16일

0 개 추천

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

TAB
TAB 2011년 9월 16일
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.
Very nice! Thank you for letting me know too! Now I know I could use those in the future.
K E
K E 2012년 3월 14일
TAB, could you please post your example code using 'ZoomFactor' and 'ScrollbarOffset'?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

질문:

TAB
2011년 9월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by