SvgPublish updated 1.2.11

The SvgPublish extension has been updated to version 1.2.11

Visit the extension's page:
https://unmanagedvisio.com/products/svg-publish/

Download the latest version:
https://unmanagedvisio.com/download/svgpublish/SvgExport-1.2.11.msi

Summary

New: Translations for German and Russian languages. Now all options and exported elements can be displayed in these languages. Japanese translation is ongoing.

Fixed relative links behavior. Please see the related article for the details.

Fixed layer behavior. Now in case when shape belongs to multiple layers, the show/hide logic corresponds one-to-one to the Visio layers logic. Also, now by default only the layers visible in Visio are toggled on; invisible layers are toggled off by default on export.

New: Non-compressed versions of scripts and templates are included to simplify customization. You can opt in to export non-compressed version by selecting a custom template without .min suffix on the developer tab.

Some stability fixes and improvements. For the full list please refer to the milestone issue list:
https://github.com/nbelyh/svgpublish-templates/milestone/1?closed=1

SvgExport updated 1.2.10

Download

Download to the latest version:
https://unmanagedvisio.com/download/svgpublish/SvgExport-1.2.10.msi

Visit the extension's page:
https://unmanagedvisio.com/products/svg-publish/

Changes

New: add hover + click tooltip and popover behavior.

This feature is supposed to solve the problem when you want to publish tooltips or popovers, that have some hyperlinks in the text body. Now you can enable them to show up and disappear if the user moves the cursor outside of the shape. However, they will stay if the user has clicked on the shape. The new setting is shown on the screen below, select trigger as hover click, i.e. both. You can also select Hide if clicked outside if you want the fixed by click tooltips to disappear when clicked outside of the shapes.

See the result in action:

New: The tooltips can now be shown/hidden with specified delays.

You can specify hide and show delays, the tooltips and popovers will appear on mouse entering the shape or mouse leaving the shape with the specified delays.

New: Trigger and position for the tooltips and popovers now can be configured.

Added in version 1.2.8. The standard position and trigger options were added Position: - top/left/bottom/right: Will show the tip or popover on the left/top/bottom/right of the corresponding shape.

  • top/auto left/auto bottom/auto right: Will show the tip or popover as specified by default, but move it if it does not fit within the view.

Trigger: - hover: will show the tip or popover when the mouse hovers over the shape (on the desktop, click on the mobile)

  • click: will show the tip or popover when the shape is clicked
  • hover click: will show the tip when the mouse hovers the shape and fix it to stay visible if clicked (until clicked again)

Fix: Fix for IE11 layer-switching toggle display issue

Bootstrap-switch updated to v. 3.3.4, fixed in version 1.2.8. Now the toggles should also work properly in the Intern Explorer 11 (in all newer browsers they already worked properly)

Fix: Publishing using the option Export Single Page NRE when ShapeSheet window is opened

Fixed in version 1.2.9. The extension showed Null Reference Exception error if you open a ShapeSheet window in (as a separate sibling window) for some shape on the diagram being published, and Single Page option was selected. Now it should work properly.

Using SvgPublish as Visio Online script playground

In the latest release of the SvgPublish extension (1.2+),
a new script editor is added that allows to play with scripting for the new Visio Online with comfort.

Here is the "online" version (in-browser editing):

    

The experience is somewhat similar to the ScriptLab, a project to support other Office applications, when you can write some code and then run it both online and offline.

Continue reading"Using SvgPublish as Visio Online script playground"

HTML Export plugin API documentation

The HTML Export plugin supports automation API (can be called programmatically). This allows you to execute export with code. The addin can be used from any language that supports automation, including in particular Visio's VBA, .NET languages, powershell, etc. 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 (named is called "GenerateVisioSvg"), and you can use it to add a reference to your project for autocomplete.

With API, you can:

  • Export to disk, sharepoint, github
  • Get/Set any export parameters (paths, options, authorizations, etc)

In other words, there is finally a documentation for the plugin's Visio API 🙂
Check out the API page and the API Reference

The documentation refers to the latest version 1.2

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 customized. 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).

Continue reading"Starting PuTTY from an exported HTML diagram"

Command line to import/export Visio VBA code

The import/export VBA extension supports not only the UI (button-click), but also command line interface!

It was not initially documented (now it is), but the tool includes command-line utility as well, so that one can use it with powershell script or a batch file (for batch processing of files), or in any other automated way. For this functionality MSI (full) version is required:  VisioImportExportVba-1.0.3.msi (912.0 KiB)

Below are some examples of what can be done using command line.

Continue reading"Command line to import/export Visio VBA code"

Scripts used in svg publish extension are on github

Recently published all javascript, html, and css code of scripts used in html publishing to the GitHub for the upcoming version 1.1:

https://github.com/nbelyh/svgpublish-templates

This repository contains the default built-in templates, that are used in the Svg Publish extension

The scripts/style files are bundled and minified at the build time by the extension,
and visible in the template as file "vp-script.min.js" and "vp-style.min.css" respectively.
The default template, installed with the app, is also there.

First, these are for reference. Second, they can be easily used your own solution. There are two ways:

Way 1. Just drop the content of the file into "immediate" script window on the diagram.
Remember to uncheck corresponding option, if you ware overwriting it with custom code.

Way 2. You can use these as samples to create your own custom template.
To do so, create a copy of the vp-template.html file, and check "use custom template" in the settings.

Simple example: tooltip. In fact, it's almost 100% stock bootstrap tooltip. The core is just this simple:

// run through all exported shapes
$.each(diagram.shapes, function (shapeId, shape) {

        if (!shape.Comment)  // if shape has no comment, skip it
            return;

        // get SVG element for the shape by id
        var $shape = $("#" + shapeId);

        // attach bootstrap tooltip to it:
        $shape.tooltip({
            container: "body",
            title: shape.Comment
        });