Using SolutionXML with C#

Visio has a feature which allows third-party solutions to store it’s custom data in Visio files as XML fragments. It might be useful if you don’t want to litter document or shapes shapesheet(s) with your data. Also it has an advantage that setting it, unlike setting cells in shapesheet, does not trigger undo/redo, so user’s work is not interfered. Working with solution XML elements might require a bit work, here is a short code fragment how to deal with that in C#. The key point is that you need to create your own namespace in the XML, and then all your data …

Visio project templates updated (Visio 2016, VS 2015 support)

Visio project templates updated to version 1.0.7: – added support for Visual Studio 2015 – added support for Visio 2016 – Simplified source code (removed extra files, so that project structure is more like vanilla VS). – Unified project wizard. Now there is one wizard to rule it all. It allows you to add (bside the add-in itself) other Visio files/templates in the wizard itself, add name/description, etc. Addin type selection, Visio files selection, setup – from one wizard. – License support in installer. – Support for the built-in VS ribbon designer (optional) – Support for both x86 and x64 in one …

MSAGL on GitHub

Hi guys, MSAGL is now open-source, and available on GitHub! MSAGL (Microsoft Automatic Graph Layout) is a graph layout library, used for example as base to build diagrams in Visual Studio (as far as I know of course). Thanks to Saveen Reddy for sharing this information!

Update to Visio Addin project templates

Visio project templates updated to version 1.0.2:– Now Visual Basic projects are also supported– now the platform of the installed Visio is selected by default, and Visio is selected as executable to debug by default– Added default UI to the installer– Fixed issue with some configurations (error on project creation if some specific combination of checkboxes is selected) More information here

Project templates: Visio Panel Addin

Hello all, Have recently published a bunch of templates to create Visio Add-ins in Visual Studio. Templates for creating Visio COM addnins & VSTO addins. The template includes: – Installer project – User interface to start with – A TaskPane (not really a “TaskPane”, but a docking panel), and a toggle button to control it – Custom images for the buttons. – State (enabled/disabled) for the buttons. – Optional support for legacy Visio version (2003/2007; command bar with buttons) More information

Using the same set of button images with transparency in all Visio versions

If you write a Visio add-in that targets multiple Visio versions at the same time, and have some custom buttons with images (with transparency), you might run into trouble with that new Visio 2010 Ribbon user interface needs different “flavor” of images compared to Visio 2003 and 2007. So you’ll have to to either create two separate sets of images (one set for pre-ribbon version of Visio, the second set for the ribbon one), or to “dance around a little” and make both versions consume the same set of images. The article focuses on the second approach I ended up …

Persisting Visio shapes

This article explains this post in microsoft.public.visio.developers newsgroup, and provides information on how one can to save Visio shapes in external source exactly, so here is the code to store master/shape in a stream and then drop it back to the document: To save Visio shapes in some external system (persist them) you can: – Query master or shape you want to persist for IDataObject interface. – Using this interface, obtain data blob in “Visio 11 Shapes” clipboard format (or maybe actually anything that contains “Shapes” word to be compatible with further Visio versions, please refer to the code). Now this …

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. This article discusses the implementation of a document-specific tab in a COM add-in; also, it focuses on details you might be interested in if you e.g. program unmanaged C++. Note that you could create a custom document-specific ribbon 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