A few years ago, I wrote an article about messaging and encryption inspired by a visit to the National Museum of Computing in the UK. I developed a Morse Click shape to demonstrate how Visio can be used to represent and learn Morse Code. However, I never published the shapes here, and my good friend John Marshall recently wrote an article about Braille in Visio, so I thought I should explain how I made the Morse Click shapes, and I took the opportunity to enhance the shapes with some accessibility features that I have learnt since I originally designed them. I have also changed the shapes to be Visio Web friendly, which means, for example, removing shape effects.
I think I learnt Morse Code as a Cub Scout, but forgotten it in the half-century since. Its evolution, and its use today still makes very interesting reading. Each letter comprises of between one and four short or long clicks, whilst each number has five such clicks. Generally, the most used letters have lesser clicks, with ET being the lowest number, presumably to save an extra terrestrial money on a phone call home!
There are just two master shapes of interest here, Morse Click and Morse Click Rack, and a couple of page Shape Data rows. The Morse Click shape can be anyone of the 36 characters with a simple Shape Data value change, whilst the Morse Click Rack is a list shape and can spell out the words of up to 26 Morse Click shapes within it.
Morse Click master
The Morse Click shape displays either just the clicks required to transmit a letter or numeral, or both the clicks and the character. In addition, the ScreenTip displays the pronunciation of each character so that it will be narrated for the visually impaired. I have also ensured that the clicks and character are displayed with high contrast to the background fill colour.
A random character can either be displayed by selecting the Get random character right menu option, or by dropping a copy of the shape when the page Random character on drop Shape Data value is TRUE. This latter value can be set directly in the page Shape Data window, however this is not available in Visio Web, so both the Morse Click and Morse Click Rack shapes have the ability of setting this page Shape Data value from their right mouse menu.
Similarly, the page Hide Text Shape Data value can be set directly in the page, or in either of the Morse Click shapes.
The Character value can be set from the Shape Data window, where there is a drop-down list of all thirty-six characters, or from the right mouse menu of the Morse Click shape, where it is grouped by the number of clicks.
The shape is a group with two sub-shapes, Character and Click. I could possibly have amalgamated them into a single shape, but I decided to keep them separate for clarity. The Click shape has multiple geometry sections, five ellipses and five rectangles, which have their visibility controlled by a formula in the NoShow cell.
=NOT(STRSAME(INDEX(n,Sheet.5!User.Clicks),"_"))
or
=NOT(STRSAME(INDEX(n,Sheet.5!User.Clicks),"."))
These formulas reference the group shape User.Clicks cell which has the formula:
=INDEX(0,Prop.Clicks," ")&";"&INDEX(1,Prop.Clicks," ")&";"&INDEX(2,Prop.Clicks," ")&";"&INDEX(3,Prop.Clicks," ")&";"&INDEX(4,Prop.Clicks," ")
This formula references the Prop.Clicks cell value which contains a semi-colon separated list of
=";. _ ;_ . . . ;_ . _ . ;_ . . ;. ;. . _ . ;_ _ . ;. . . . ;. . ;. _ _ _ ;_ . _ ;. _ . . ;_ _ ;_ . ;_ _ _ ;. _ _ . ;_ _ . _ ;. _ . ;. . . ;_ ;. . _ ;. . . _ ;. _ _ ;_ . . _ ;_ . _ _ ;_ _ . . ;. _ _ _ _ ;. . _ _ _ ;. . . _ _ ;. . . . _ ;. . . . . ;_ . . . . ;_ _ . . . ;_ _ _ . . ;_ _ _ _ . ;_ _ _ _ _ "
These clicks are in the same order as the Prop.Character.Format cell formula:
=" ;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;1;2;3;4;5;6;7;8;9;0"
Therefore, when a user selects a Prop.Character, then the index number of the selection is held in the User.CharacterIdx cell:
=LOOKUP(Prop.Character,Prop.Character.Format)
Then this index number can be used to display the corresponding clicks in the Prop.Clicks.Value cell:
=GUARD(INDEX(User.CharacterIdx,Prop.Clicks.Format))
The selected clicks are each separated by a space character, which helps legibility but also enables the User.Clicks cell to use this in determining which type of click is required at the nth position:
INDEX(n,Prop.Clicks," ")
Similarly, the Prop.Sound.Format cell holds the list of sounds required for each character:
=” ;di dah;dah di di dit;dah di dah dit;dah di dit;dit;di di dah dit;dah dah dit;di di di dit;di dit;di dah dah =” ;di dah;dah di di dit;dah di dah dit;dah di dit;dit;di di dah dit;dah dah dit;di di di dit;di dit;di dah dah dah;dah di dah;di dah di dit;dah dah;dah dit;dah dah dah;di dah dah dit;dah dah di dah;di dah dit;di di dit;dah;di di dah;di di di dah;di dah dah;dah di di dah;dah di dah dah;dah dah di dit;di dah dah dah dah;di di dah dah dah;di di di dah dah;di di di di dah;di di di di dit;dah di di di dit;dah dah di di dit;dah dah dah di dit;dah dah dah dah dit;dah dah dah dah dah”
Thus, the specific series of click sounds for a selected character can be returned with the following formula in Prop.Sound.Value cell:
=GUARD(INDEX(User.CharacterIdx,Prop.Sound.Format))
These are the key formulas for the Morse Click shape, but there is another key formula that is required when it is placed within a Morse Click Rack shape…
Morse Click Rack master
The Morse Click Rack shape is a list container that can hold any amount of Morse Click shapes, although only five are automatically inserted on drop.
The right mouse menu has a link to a dictionary web site to Check word, and the options to Hide Text or have Random character on drop.
Visio List shapes are a specialised form of a Container shape. The list shape has a function, LISTMEMBERCOUNT(), to get number of members it has, but it does not have a function to get at the individual member shapes.
The member shapes, however, do have a function, LISTSHEETREF(), that gives them a reference to the list that they are within, and another function, LISTORDER(), which returns their position within the list. Therefore, the member shapes can push any of their cell values, in this case Prop.Character, to a known cell, say User.Member_nn, in the list shape automatically. So, the Morse Click Rack has a number of User Defined Cells, Member_01 to Member_26 (it could have been more), into which its members push their Prop.Character values with a formula in their User.SetMemberTrigger cell:
=IF(LISTORDER()=1,SETF(GetRef(LISTSHEETREF()!User.MEMBER_01),Prop.Character),IF(LISTORDER()=2,SETF(GetRef(LISTSHEETREF()!User.MEMBER_02),Prop.Character),...etc
Then the sequence of characters contained in the list can be displayed by simply concatenating each of these values together, after ensuring that it is a currently pushed value, so the list’s Header sub-shape User.MemberCharacters cell has the formula:
=IF(LISTMEMBERCOUNT()>0,User.Member_01,"")&IF(LISTMEMBERCOUNT()>1,User.Member_02,"")&...etc
This can then be displayed or not, depending on the page Prop.HideText value.
Note: I did try to also push the Prop.Sound value into the User.Member_nn.Prompt cells, but the LISTSHEETREF() function does not allow the User Defined Prompt cells to be referenced.
Example Document
The sample Visio document can be downloaded from here if you cannot see it below.
My new book on Visualizing Processes with Microsoft Visio has launched
Back in the early 1990s, there was an application called ABC Flowcharter that was the market leader for diagramming business flowcharts, but some of the brains behind Aldus PageMaker saw an opportunity to create something smarter, and left to write the Visio product, with the stated aim to overtake ABC Flowcharter within 2 years. They…
Interactive Demographics of the European Union in Visio
I was recently contacted by a reader, Stanley M. Max (Towson University lecturer), who had started creating a Visio map of the 27 countries in the European Union in 2020, along with the demographics culled from Wikipedia. He wanted to know if the map and stats could be combined to make a more appealing presentation.…
Understanding Visio Data Graphic’s Color by Value
The desktop Visio editions, Visio Professional and Visio Plan 2, have a great way of automatically displaying data as Data Bars, Icon Sets, Text Callouts and Color by Value. The first three types of Data Graphics require sub-shapes to be inserted into each shape that they are applied to, but the last one, Color by…
Pushing Data Visualizer in Visio beyond its limits
My last post was about some of the lessons learnt when trying to push Data Visualizer to its limits, but this one has some ways of overcoming these limitations. The main lesson learnt is that DV binds the shapes within the DV container shape, CFF Data Visualizer, and controls some of the ShapeSheet cells that…
Pushing Data Visualizer in Visio to the limits!
Regular readers of my blog will know that I like to use the Data Visualizer (DV) in Visio Plan 2, but I recently tried to help a user who really decided to push it to the limits. In this scenario, there were multiple connections, but with different labels, being created between the same flowchart shapes,…
Setting Theme defaults in Visio
I was recently asked how to change the default font size and line weight in Visio, and then saw then many others are asking the same sort of question. I found one reasonable answer suggesting that you should create a new document from your required template, then edit the Styles to suit, and then save…
Leave a Reply