ShapeSheet Formula AutoComplete & Other Improvements


In this post, we’ll be covering improvements to the ShapeSheet in Visio 2010 that make it easier for shape developers to create and modify existing Visio shapes.

For those who don’t know, Visio shapes are more complex than they may seem at first; behind each shape is a ShapeSheet (you can get more details here and here if you're unfamiliar with the ShapeSheet). In Visio 2010, you can access a shape's ShapeSheet by selecting the shape in question and clicking the "Show ShapeSheet" button on the Developer tab. If you don’t have the Developer tab up already, learn how to turn it here. Once you’re in ShapeSheet mode you’ll see the following user interface:

image

As you navigate through the updated ShapeSheet experience you’ll quickly stumble on our improvements. In the ShapeSheet editing window (1 above), Visio 2010 now facilitates user input with a new feature called ShapeSheet Formula AutoComplete. The ShapeSheet user interface has also been simplified considerably by the creation of the ShapeSheet Contextual Tab (2 above) to facilitate common ShapeSheet actions.

Let’s take a deeper look into each improvement.

ShapeSheet Formula AutoComplete

One key features of the ShapeSheet is that it enables Visio shape developers to create a dependency between one shape property (also known as a ShapeSheet cell) and another through a formula. For example a shape developer can set height = 2 * width.

To this day, to become a proficient shape designer, you had to memorize all 345 cell names, 17 row names, 40 section names and the syntax to 181 ShapeSheet functions – not an easy task! Visio 2010 however makes your life much easier by introducing a new feature called ShapeSheet Formula AutoComplete. This feature helps you compose ShapeSheet formulas by:

1. Providing a context-sensitive list of ShapeSheet formula keywords as you type. All ShapeSheet functions, section names, row names and most** cell names are accessible via ShapeSheet Formula AutoComplete (**Visio doesn’t surface cells in non-named rows such as the “X1” or “Y1” rows in the Geometry section). As you compose a formula in a cell, Visio scrolls a list of keywords that are appropriate for the current context and selects the keyword that most closely matches what you're typing.

Take a look below to see ShapeSheet Formula AutoComplete in action. As you type “P-R-O”, the list of keywords scrolls to the “Prop” section name which also gets selected as Visio’s best guess. After auto-completing the section name by using “.”, Visio replaces the keyword list with one that makes sense in this new context, in this case the shape data item “CostOfShape”.

image

Also notice that Visio helps you locate the keyword you’re looking for by sorting them alphabetically and tagging them with one of the icons below depending on what type of keyword it is.

image

2. Providing a quick input mechanism for ShapeSheet formula elements. Once you've typed enough letters to uniquely identify a ShapeSheet keyword, you can simply hit "Enter" or "Tab" to complete the keyword. Depending on context, the ",", ".", "!", “*”, “+”, “-”, “/”, “[”, “(“ and “)” symbols will also do the trick.

3. Providing a definition of the ShapeSheet items. If you're not sure of the definition of a ShapeSheet keyword, a tool tip appears next to the currently selected keyword in the AutoComplete list with a definition for it. For example, below, is a definition for the PATHSEGMENT function, one of the new ShapeSheet functions in Visio 2010.

image

4. ShapeSheet function parameter browsing. As you compose a ShapeSheet function, the function signature appears above the cell in a tooltip. The bolding in the tooltip changes as you progress through a function’s arguments.

image

5. ShapeSheet formula parenthesis matching. As you close a parenthesis pair with a ")" character, ShapeSheet Formula AutoComplete will highlight the matching open-parenthesis in red.

image

ShapeSheet Formula AutoComplete is available in the following textboxes, dialogs and windows throughout Visio 2010:

  • In a ShapeSheet cell
  • In the ShapeSheet formula edit bar
  • In the new “Edit Formula” dialog which you can launch from the ShapeSheet contextual tab
  • In the “Insert Field” dialog, when typing in a custom ShapeSheet formula
  • In the “Edit Data Graphics” dialog, wherever you have the opportunity to add a custom ShapeSheet formula.

The ShapeShee Formula AutoComplete feature can be toggled off through one of these entry points:

  • Toggling the relevant option in the “Visio Options”>“Advanced” dialog.
  • Toggling the value of the Software\Policies\Microsoft\Office\14.0\Visio\Application\EnableFormulaAutoComplete registry key.
  • Toggling the value of Application.Settings.EnableFormulaAutoComplete API property.

ShapeSheet Contextual Tab

Apart from ShapeSheet Formula AutoComplete, the ShapeSheet has gotten a facelift thanks to the Fluent UI – all ShapeSheet related commands are now in one place. Take a look at the ShapeSheet contextual tab below.

image

In more detail:

Chunk

Button

Functionality

View

Formulas

Toggle the “formula” view of the ShapeSheet – all cell formulas are shown.

 

Values

Toggle the “value” view of the ShapeSheet – all cell results are shown.

 

Sections

Surfaces the “View Sections” dialog which lets you show or hide ShapeSheet sections.

 

Style Explorer

Surfaces the “Style Explorer” pane that lets you view and edit styles in the current drawing.

Section

Insert

Adds optional sections of your choice to the currently selected ShapeSheet.

 

Delete

Deletes the optional section you have currently selected.

Rows

Insert

Adds a row to the optional section you have currently selected.

 

Delete

Deletes a row from the optional section you have currently selected.

Editing

Edit Formula

Surfaces the “Edit Formula Dialog”, seen below, which gives you more room to enter long equations as well as the possibility of adding carriage returns to your formulas to improve legibility. As you can see below, ShapeSheet Formula AutoComplete is still active in this dialog.

image

Note that you can also open this dialog by using the “ctrl+e” key combination.

 

Shape Data

Adds a ShapeData row to the currently selected ShapeSheet.

 

Hyperlink

Adds a Hyperlink row to the currently selected ShapeSheet.

 

Shape Action

Adds an Action Row to the currently selected “Actions” section.

Formula Tracking

Show windows

Toggles the visibility of the “Formula Tracing” window.

 

Trace Precedents

List in the “formula tracing” window all the cells the currently selected cell depends on.

 

Trace Dependents

List in the “formula tracing” window all the cells that depend on the the currently selected cell.

 

Back

Jumps to the previous cell in the formula tracing history.

 

Forth

Jumps to the next cell in the formula tracing history.

Using the Fluent UI, Visio can now enable and disable interactively the ShapeSheet operations that you can take against a particular cell while you're editing it; this removes some of the right-click menu hunting you may have done in the past.

Also…

The final change we’ve made to the ShapeSheet experience in Visio 2010, is to enable shape designers to open one ShapeSheet window per shape instead of re-using the same window for all shapes, the latter behavior being the default in previous releases of Visio.

Try it out!

Download Visio 2010 Beta and start building shapes with the 2010 ShapeSheet -- we're interested in hearing what you think of Visio's new and improved ShapeSheet experience. You can send us your feedback by either commenting on this blog post or sending us information via Send a Smile.