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 should go there. The sample assumes that you want to store some “settings” in the solution xml element.

Continue reading

New tool – Visio Import/Export VBA

Hi all,

Have recently have created an extension to import/export VBA code from a Visio drawing or stencil. You can find this useful if you want to track VBA source code changes in your Visio files, like compare current version of the code with the past version. Could make sense to use together with some version control like TFS, Subversion, or GIT.

Extension page:
VBA Import/Export for Visio

Continue reading

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 installer in one MSI (one DLL compiled to “AnyCPU”)
– Support per user/per machine install in one MSI
– Support for project auto-harvesting. Means, DLL version is auto-harvested, COM registration auto-harvested (for COM addin type).

Continue reading

Rubberduck – refactoring in VBA

Hi all, recently came across an interesting Rubberduck project. Did you think that VBA is dead and buried? It looks like it’s not going down that easily!

Rubberduck is a COM Add-In for the VBA IDE that makes VBA development even more enjoyable, by extending the Visual Basic Editor (VBE) with menus, toolbars and toolwindows that enable things we didn’t even think were possible when we first started this project.

If you’re learning VBA, Rubberduck can help you avoid a few common beginner mistakes, and can probably show you a trick or two – even if you’re only ever writing macros. If you’re a more advanced programmer, you will appreciate the richness of Rubberduck’s feature set.

Continue reading

Moving control point along path in Visio

Hello all,

Here is a technique you can use to make control point “stick” to a connector path. I’ve learned it recently from these two topics (one, two). I found it interesting:

test

To achieve this sort behavior (although not necessarily with hearts, but just plain text) you can use some Visio ShapeSheet functions, which might be not of everyday use:

Continue reading

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