{"id":4432,"date":"2015-02-12T14:32:24","date_gmt":"2015-02-12T19:32:24","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/?p=4432"},"modified":"2017-08-28T20:30:14","modified_gmt":"2017-08-29T01:30:14","slug":"commenting-out-in-stateflow","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2015\/02\/12\/commenting-out-in-stateflow\/","title":{"rendered":"Commenting out&#8230; in Stateflow!"},"content":{"rendered":"<p>I am so happy right now!<\/p>\r\n\r\n<p>Since R2012b, it has been possible to comment out blocks in Simulink. As soon as this feature was released, it immediately became popular among all the users I know.<\/p>\r\n\r\n<p>Soon after, in R2013b, the possibility to comment-through blocks with same numbers of inputs and outputs was introduced. Also very useful!<\/p>\r\n\r\n<p>Today I just realized that in R2014b, it is also possible to <a href=\"https:\/\/www.mathworks.com\/help\/stateflow\/ug\/comment-out-stateflow-objects.html\">comment out Stateflow objects<\/a>.<\/p>\r\n\r\n<p><strong>Commenting Stateflow Objects in a Chart<\/strong><\/p>\r\n\r\n<p>Commenting out a Stateflow object is as easy as it should be. Select one or more objects and hit <strong>Ctrl+Shift+X<\/strong><\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q1\/Stateflow Comment.gif\" alt=\"Commenting out States and Transitions in Stateflow\" \/><\/p>\r\n\r\n<p><strong>Adding text to the commented objects<\/strong><\/p>\r\n\r\n<p>One useful feature associated with commented Stateflow objects is the possibility to add notes, for example to explain why the object is commented. Click on the % sign on the bottom left corner of the object and a dialog will popup.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q1\/addingNotes.png\" alt=\"Adding a note to a commented Stateflow object\" \/><\/p>\r\n\r\n<p>The text entered in this dialog will be displayed when you hover the mouse over the object.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q1\/displayingNotes.png\" alt=\"Displaying a note to a commented Stateflow object\" \/><\/p>\r\n\r\n<p><strong>Now it's your turn<\/strong><\/p>\r\n\r\n<p>In my opinion, the ability to comment out Simulink blocks and Stateflow objects, has most significantly affected my model editing workflow in many years.<\/p>\r\n\r\n<p>Have you also included the commenting in your workflows? Let us know by leaving a <a href=\"https:\/\/blogs.mathworks.com\/seth\/?p=4432&#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\/2015Q1\/displayingNotes.png\" onError=\"this.style.display ='none';\" \/><\/div><p>I am so happy right now!\r\n\r\nSince R2012b, it has been possible to comment out blocks in Simulink. As soon as this feature was released, it immediately became popular among all the users I... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2015\/02\/12\/commenting-out-in-stateflow\/\">read more >><\/a><\/p>","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[43,33,56],"tags":[419],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4432"}],"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=4432"}],"version-history":[{"count":7,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4432\/revisions"}],"predecessor-version":[{"id":6720,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4432\/revisions\/6720"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=4432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=4432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=4432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}