How to import a graph into Microsoft Visio

Questions & Answers

Summary

This article describes how to import a visual graph representation into Microsoft Visio

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

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.

This article refers to Microsoft Visio 2003. Some approaches might vary and described shortcomings might be fixed in higher versions .

Categories this article belongs to:
yFiles for Java > yFiles Viewer > Input and Output > Exporting a Graph's Visual Representation
yFiles for Java > yFiles Viewer > yExport Extension Package
yFiles for Java > yFiles Viewer > ySVG Extension Package
Applies to:
yFiles for Java 2: 2.5, 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 2.12, 2.13
Keywords:
Microsoft - Visio - export - graph - SVG - PDF - EMF - GIF - JPG - PNG