{"id":4068,"date":"2014-09-01T09:59:52","date_gmt":"2014-09-01T14:59:52","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/?p=4068"},"modified":"2014-09-01T18:43:53","modified_gmt":"2014-09-01T23:43:53","slug":"guidelines-for-optimal-model-navigation-and-editing","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2014\/09\/01\/guidelines-for-optimal-model-navigation-and-editing\/","title":{"rendered":"Guidelines For Optimal Model Navigation and Editing"},"content":{"rendered":"<!--introduction-->\r\n<p>I recently had a discussion with a friend about <a href=\"http:\/\/en.wikipedia.org\/wiki\/Touch_typing\">touch typing<\/a>. Obviously, if you work on a computer all day, it is worth learning this technique to type fast without looking at the keyboard.<\/p>\r\n\r\n<p>But what about Simulink? A lot of work is done using the mouse, so the touch typing configuration is less relevant. Are there guidelines or tips to build, edit, and navigate simulink models as efficiently as possible?<\/p>\r\n\r\n<p>This week I share mine!<\/p>\r\n<!--\/introduction-->\r\n<p><strong>Navigating<\/strong><\/p>\r\n\r\n<p>When navigating, I typically keep my thumb on the <strong>Alt<\/strong> key, my middle finger on the <strong>Esc<\/strong> key, and the index on the <strong>1<\/strong> key.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2014Q3\/Navigationconfig.png\" alt=\"Hand position on the keyboard when navigating Simulink models\" \/><\/p>\r\n\r\n<p>This allows me to easily do:<\/p>\r\n\r\n<ul>\r\n\t<li><strong>Esc<\/strong> to go up one level with the middle finger<\/li>\r\n\t<li><strong>Atl+1<\/strong> to zoom 100%, using thumb on <strong>Alt<\/strong> and index on <strong>1<\/strong><\/li>\r\n\t<li><strong>Space bar<\/strong> to zoom to fit with the thumb<\/li>\r\n\t<li><strong>Alt+Tab<\/strong> to switch between windows, typically the Library Browser and the model, using thumb on <strong>Alt<\/strong> and index on <strong>Tab<\/strong>.<\/li>\r\n<\/ul>\r\n\r\n<p>Here is a typical example of me exploring a model. This typically ends up being a pattern of hitting the <strong>Space bar<\/strong>  when I enter a new subsystem to get the big picture, then <strong>Atl+1<\/strong> to see the blocks zoomed at 100% and <strong>Esc<\/strong> to go up one level when I am done.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2014Q3\/NagivationKeys.gif\" alt=\"Navigating Simulink models\" \/><\/p>\r\n\r\n<p><strong>Editing<\/strong><\/p>\r\n\r\n<p>When editing, what I need the most are the <strong>Ctrl<\/strong> and <strong>Ctrl+Shift<\/strong> shortcuts. So I slightly move my left hand to keep my small finger on the <strong>Ctrl<\/strong> key, and my ring finger on the <strong>Shift<\/strong> key.<\/p> \r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2014Q3\/EditConfig.png\" alt=\"Hand position on the keyboard when editing Simulink models\" \/><\/p>\r\n\r\n<p>Here is the list of shortcuts I typically use in this configuration:<\/p>\r\n\r\n<P>Bottom line:<\/P>\r\n<ul>\r\n\t<li><strong>Ctrl+Z<\/strong> to Undo<\/li>\r\n\t<li><strong>Ctrl+X<\/strong> to Cut<\/li>\r\n\t<li><strong>Ctrl+C<\/strong> to Copy<\/li>\r\n\t<li><strong>Ctrl+V<\/strong> to Paste<\/li>\r\n\t<li><strong>Ctrl+B<\/strong> to Build the model using Simulink Coder<\/li>\r\n<\/ul>\r\n\r\n\r\n<P>Middle Line:<\/P>\r\n<ul>\r\n\t<li><strong>Ctrl+A<\/strong> to Select all blocks in the current system<\/li>\r\n\t<li><strong>Ctrl+S<\/strong> to Save<\/li>\r\n\t<li><strong>Ctrl+D<\/strong> to update the diagram (ALWAYS keep your model as close as possible to an updatable state, this will save you lots of debugging time!)<\/li>\r\n\t<li><strong>Ctrl+G<\/strong> to Group selected blocks in one subsystem<\/li>\r\n\t<li><strong>Ctrl+H<\/strong> to open the Model Explorer (am I the only one to pronounce it Model HHHexplorer because of that?)<\/li>\r\n<\/ul>\r\n\r\n<p>Top line:<\/p>\r\n<ul>\r\n\t<li><strong>Ctrl+E<\/strong> to open the model configuration<\/li>\r\n\t<li><strong>Ctrl+R<\/strong> to Rotate blocks<\/li>\r\n\t<li><strong>Ctrl+T<\/strong> to start a simulation<\/li>\r\n\t<li><strong>Ctrl+Y<\/strong> to redo something previously undone<\/li>\r\n\t<li><strong>Ctrl+U<\/strong> to open a masked subsystem. With the introduction of the arrow badge, I use this shortcut less often since R2012b<\/li>\r\n\t<li><strong>Ctrl+I<\/strong> to flip a block left-right. Ok, this one requires some intense stretching to be done with only one hand... be careful to not hurt yourself.<\/li>\r\n<\/ul>\r\n\r\n<p>In addition go the <strong>Ctrl<\/strong> shortcuts, this hand position allows you to access a set of <strong>Ctrl+Shift<\/strong> shortcuts, by using the little finger for <strong>Ctrl<\/strong>, and the ring finger for <strong>Shift<\/strong>:<\/p>\r\n\r\n<ul>\r\n\t<li><strong>Ctrl+Shift+X<\/strong> to Comment out and uncomment blocks<\/li>\r\n\t<li><strong>Ctrl+Shift+Y<\/strong> to Comment through blocks<\/li>\r\n\t<li><strong>Ctrl+Shift+H<\/strong> to remove highlighting in the model<\/li>\r\n\t<li><strong>Ctrl+Shift+G<\/strong> to Expand a subsystem<\/li>\r\n\t<li><strong>Ctrl+Shift+L<\/strong> to open the Simulink Library Browser. (This one cannot be done only with the left hand, but I thought I should point out his existence. Most of the time, when I edit model I alternate between the Library Browser and the model using <strong>Atl+Tab<\/strong>)<\/li>\r\n<\/ul>\r\n\r\n<p><a href=\"https:\/\/www.mathworks.com\/help\/simulink\/ug\/summary-of-mouse-and-keyboard-actions.html\">You can see the full list of Simulink shortcuts here.<\/a><\/p>\r\n\r\n<p>Since many <strong>Ctrl+Shift<\/strong> combinations do not have shortcuts assigned, I like to use those to assign custom shortcuts using an sl_customization file, as <a href=\"https:\/\/blogs.mathworks.com\/seth\/2013\/06\/24\/defining-custom-shortcuts-in-simulink\/\">I previously highlighted in this post<\/a>. One example for me is <strong>Ctrl+Shift+Z<\/strong> to display or not the name of blocks.<\/p>\r\n\r\n<p>Here is an animation showing usage of the most common shortcuts:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2014Q3\/modelEditing.gif\" alt=\"Editing Simulink models\" \/><\/p>\r\n\r\n<p><strong>Now it's your turn<\/strong><\/p>\r\n\r\n<p>Share your tricks to use Simulink as efficiently as possible by leaving a <a href=\"https:\/\/blogs.mathworks.com\/seth\/?p=4068&#comment\">comment here<\/a>.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2014Q3\/modelEditing.gif\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction-->\r\n<p>I recently had a discussion with a friend about <a href=\"http:\/\/en.wikipedia.org\/wiki\/Touch_typing\">touch typing<\/a>. Obviously, if you work on a computer all day, it is worth learning this technique to type fast without looking at the keyboard.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2014\/09\/01\/guidelines-for-optimal-model-navigation-and-editing\/\">read more >><\/a><\/p>","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[33],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4068"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=4068"}],"version-history":[{"count":45,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4068\/revisions"}],"predecessor-version":[{"id":4156,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4068\/revisions\/4156"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=4068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=4068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=4068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}