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.
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:
Therefore, when a user selects a Prop.Character, then the index number of the selection is held in the User.CharacterIdx cell:
Then this index number can be used to display the corresponding clicks in the Prop.Clicks.Value cell:
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:
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:
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:
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:
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.
The sample Visio document can be downloaded from here if you cannot see it below.
I wrote a post about making a clock face in Visio fifteen years ago, but a reader recently asked about displaying multiple time zones. Well, I have previously written about time zones in Visio, so I accepted the challenge to improve upon my earlier work. (more…)
When Microsoft introduced a new way of linking external data to Visio shapes in 2007, I initially bemoaned the inability to update anything but Shape Data row values, unlike the old database add-on that I had been using for 10 years. The new method, though, has many advantages over the old way, not least that…
Microsoft Visio has a useful Structured Diagramming concept that consists of Containers, Callouts and Connectors. The first of these features make it possible for shapes to know what they are contained within, as a better option to grouping shapes together. Grouping can hide or break the grouped shapes smartness, so Visio provides two ways of…
There are literally thousands of master shapes in the stencils supplied with Microsoft Visio, so I guess that mistakes can creep in. One error that I have noticed is the inability of the default text control handle of many of the network shapes to actually move the text block horizontally. (more…)
I have only been developing Visio solutions for 25 years, but I got a surprise this week when I was trying to understand why I couldn’t update the value of a Shape Data row of multiple selected shapes. It is something that I often do, so it took me a while to understand why I…
There are times, in Visio, when you just need to ensure that the text in a primary shape is synchronised with the text in different secondary shapes … even if they are on different pages of a Visio document. My previous article, Forcing Display Update of Inherited Data Values , describes a method of synchronising…