Starting PuTTY from an exported HTML diagram

Consider a following scenario: you have a diagram containing network devices (servers) and you want to start PUTTY client when any of those devices is clicked to open SSH session to a corresponding device. And you want that to be on a webpage.
A possible solution to that on windows is to register a custom application protocol and map it to launch an executable. You can see a common example when “callto:” link opens Skype. Here are some explanations. This works for all major browsers, works also in Visio (without any macros).
With Visio (and a tiny SVG Publish script), this approach can be improved. Suppose you have a rack diagram, which already has all server addresses ready. SVG Publish can convert the data into custom links that can be used to launch an executable (PuTTY in this example).

HTML Export API

The HTML Export plugin supports automation API (can be called programmatically). This allows you to execute export with code. The addin can be called from any language that supports automation, including in particular Visio VBA itself, .NET languages, Powershell. Basically, if you can call Visio API, you should be also able to call the plugin API. The type library is installed with the addin (it is called “GenerateVisioSvg”), and you can use it to add a reference to your project for autocomplete. With API, you can: Get/Set any export parameters Export to disk, sharepoint, github You can check out the …

HTML Export Options

These are the options available when exporting. These can be used to adopt the export to fit your needs. These can be set per-diagram, and can be accessed using the “Settings” button: Basic options Pages to publish All pages: publishes all pages in the document Single page: publishes only current (active) page in the document Selected pages: publishes selected pages; pages can be comma-separated, or intervals can be used, like 1-3, 5, 8 Base Template SvgPublish: default SVG export. Supports full set of additional functions, popups, scripting, etc. VisioOnline: Export to VisioOnline services for SharePoint (new in release 1.2; experimental support, …

Layers support in html publishing

With new update to Version 1.0.9 there is new “out-of-the-box” function of the HTML Export extension– layer support! Now you can publish diagrams, and add optional layer management, to allow switching layers on/off on the published diagram. This allows to control diagram’s layers on the web to show/hide it’s parts. Check out the example: Suzuki FA50 Shuttle electrical schematic. Yep, in 1990s it was all pretty simple. You can turn on/off wires of the corresponding color by clicking the layer switch, to see what is connected with what. This is out of the box. Alternatively (this part is provided by extra tiny script) – …

Pokemon office – more html popovers

New sample with updated javascript code / template created with svg publishing, to show stuff in the office (click the picture open it live) https://nbelyh.github.io/svgpublishdemo/PokemonBldgPlan.html The javascript is very similar to the one described in the Dynamic popups on published diagrams, you can check it in the source diagram. Just the formatting is different, now it builds a chunk of HTML and populates it with some images/properties from the shapes. The source diagram and the excel file are here: 

Dynamic popups (“popovers”) on published diagrams

With HTML export, you  can specify any information to show on popup (bootstrap popover) Firs, simple demo (rectangle): Live sample: https://cdn.rawgit.com/nbelyh/svgpublishdemo/fa70891f/SimplePopover.html Souce:  This is just stock popover. The code just defines a standard bootstrap popover, but for a Visio shape (#shape1). The result might not look that impressive, but I hope it looks clear. Now let’s go for something more advanced. Lets take stock diagram and show in the popover info about the relevant computer models from the HP website. Click the image to open it live (again, hosted on GitHub)

Exporting html diagrams – binding to live services

This post briefly explains how to bind Visio diagram, exported as HTML to some external live web-service. It’s based on the HTML/SVG export extension. If you want the exported diagram to be connected to some live data,  you’ll need to connect to some live service (in this example, we consider a REST service). In the following posts, I’ll discuss binding a diagram to a SharePoint list using JSOM / REST. So, let’s take map of Europe and show temperature by coloring countries, with colder colors indicating colder temperature! You can check the result in DEMO section (click the picture to navigate): Here is …