How to import a graph into Microsoft Visio
Questions & AnswersSummary
Description
What is the best way to get a visual representation of a yFiles graph in Microsoft® Visio® depends a bit on the exact use case. One can either use a bitmap image format like GIF, JPG or PNG, which are all
supported directly using yFiles distributions that contain the Viewer part (e.g. yFiles Complete and yFiles Viewer), or vector graphics like SVG, PDF or EMF.
The free yFiles extension package ySVG adds support for Scalable Vector Graphics (SVG) format to the yFiles graph visualization library.
ySVG produces SVG output that conforms to SVG 1.1. In other words, the SVG files produced by ySVG display fine in all SVG 1.1 conformant viewer implementations.
Unfortunately, Visio's SVG support seems to not stick to the SVG 1.1 standard (e.g. Visio seems to not support clips for text elements or the full value range of the stroke-miterlimit property).
For this reason importing svgs produced with ySVG might lead to exceptions in Microsoft Visio or inadequate visual representations of the graph.
The yFiles extension package yExport
will support other vector graphic formats like PDF, SWF, and EMF. Inserting graphs from a PDF file works as expected and will yield to a good visual representation of your graph inside visio.
To do so from your menu bar select:
insert -> object -> adobe acrobat document
Also importing an EMF file does work:
insert-> picture-> from file...
Nevertheless ungrouping this EMF file will lead to problems in Microsoft Visio.
For more information on supported export formats please also have a look at article yFiles Export Capabilities and the according section of the yFiles developers guide.