According to WD, the inspiration came as follows: I saw a request for audio symbols in the Visio forum, had this dumb 1998 mike shape, sent it to school and now it’s smarter.
So for you A/V folks out there in Visio Land, here’s a new SmartShape for your diagramming enjoyment!
Wapperdude added quite a few smarts to this shape. It has Shape Data fields for Manufacturer and Model. You can show or hide the text. And you can select from 9 different colors, all by right-clicking the shape!
Check out the options in that context menu:
Not being able to leave well-enough alone, I added a few modifications myself. Here’s a run-down of modifications I made:
When the text is hidden, the control handle that positions it is also hidden. This was done with the Shapesheet formula:
Controls.textPosition.XCon = 0 + 5*User.TextHidden
Linked the shape’s text to the Shape Data fields using the Insert > Field feature, and entering a custom formula:
Fields.Value = Prop.Manufacturer & CHAR ( 10 ) & Prop.Model
Simplified the SETF formulas in the Actions section. The Actions now set User-defined cells for red, green and blue values in the group’s ShapeSheet. The sub-shape that represents the microphone head then builds an RGB color from these three values.
by doing the formula-setting at the group level, and having the colored-head sub-shape refer up to the red, green, and blue values in the group’s ShapeSheet
Changed the formulas for the text’s width and height in the Text Transform section, so that the text is always fully encompassed. The formulas look like this:
TxtWidth = TEXTWIDTH(TheText)
TxtHeight = TEXTHEIGHT(TheText, TxtWidth)
Set the default formula for the text-positioning control handle, such that the text is always off of the shape, no matter how wide it is. This is done via:
Controls.textPosition.X = Width + TxtWidth/2
Protected the sub-shapes from being selected via Format > Behavior, Selection: Group Only
Set the Double-click behavior such that it shows the Shape Data pop-up window. The ShapeSheet formula is:
EventDblClick = DOCMD(1312)
Updated the Master Icon, woohoo!