Unmanaged Visio

27 June 2011

“Find Visio Command” Addin

Have you ever tried to find a command in ribbon?
Here is a new add-in which allows to quickly find commands in Visio 2010. Just type in the keyword which is part of command name, and hit enter. All commands which contain this keyword will be shown by the plugin as buttons. You can either use the command found directly from the results pane, or add it to the quick launch toolbar.
Download it here!
The big picture:
27-06-2011 4-57-14
Introductory video:
Find Visio Command
Limitations:
- Does not work with x64 version of Microsoft Visio 2010 yet.
- Search works in in English only yet.

Labels: , , ,

28 August 2009

Making the Visio ribbon tab document-dependent

This post explains how to make a ribbon tab in Visio 2010 ribbon document-specific. Means, activate a custom ribbon tab only for a specific document.

Download C# sample project (VS2008)

Download C++/ATL sample project (VS2008)

This article discusses the implementation of a document-specific tab in a COM add-in; also, it focuses on nasty details you might be interested in if you e.g. program unmanaged C++. Note that you could do this thing by other means, e.g. by embedding your custom interface in a document template using new Visio 2010 property Document.CustomUI.

Nevertheless, one of the ways to it is:

  1. Create a Visio add-in that supports ribbon (as described in previous post)
  2. Add onLoad event to the ribbon XML. This will allow you to obtain the ribbon manager.
    <customUI onLoad="OnLoad" ...>
  3. In the event handler for the onLoad event, save passed-in ribbon manager. This is needed to force update of the ribbon.
            // this function provides us with IRibbonUI object, called when XML is loaded
           public void OnLoad(object obj)
           {
               vsoRibbonUI = (Office.IRibbonUI) obj;
           }
     
Read more »

Labels: , , , ,

22 August 2009

Getting started with Visio Ribbon

This post explains how one can customize Visio 2010 Ribbon from Visio add-in (and is based on Visio CTP). Namely, it shows how to add a custom tab to the Visio ribbon.

Download C# sample project (VS 2008 solution, 12 Kb)

Download C++/ATL sample project (VS 2008 solution, 19 Kb)

Though Visio has been resistant to innovations in user interface for quite a long time (just remember those 16-color icons in the stencils), it seems that finally "the time has come", and the ribbon interface has won the game. I started this project to estimate the amount of work one needs to adopt his add-in to the new Ribbon interface. I should mention that old CommandBars API that was normally used for user interface customization does still work for new Visio 2010; the point is that it just looks a bit unnatural, and kind of unnatural.

The way it looked in Visio 2007, native toolbar and menu: image

If you won’t do a thing, then in Visio 2010 you’ll get something like: image If you ask me, this doesn’t look like an exciting user experience… No transparency, no fancy 32-bit images, all custom toolbars (from all add-ins) are put to the “Custom Toolbars” group, all custom menus (from all add-ins) are put into “Menu Commands”, etc, etc… Wouldn’t it be much better if we make it look like that? image Here is list of materials about Office ribbon customization (though these are 2 years old and were written for Word 2007 and alike, now they became valid for Visio as well):

Read more »

Labels: , , , ,