Convert Visio to other formats

Export to XML

Export Microsoft Visio Drawing to PDF

The code samples show how to export Microsoft Visio Drawing to PDF using C#.

This article explains how to export a Microsoft Visio diagram to XML using Aspose.Diagram for .NET API.

  • VDX defines an XML diagram.
  • VTX defines an XML template.
  • VSX defines an XML stencil.

The Diagram class’ constructors read a diagram and the Save method is used to save, or export, a diagram in a different file format. The code snippets in this article show how to use the Save method to save a Visio file to VDX, VTX and VSX.

The image below shows the diagram that is exported in the code snippets below. The exported file is shown before each code snippet.

A Microsoft Visio diagram about to be exported.
todo:image_alt_text

Export VSD to VDX

VDX is a schema-based XML file format that lets you save diagrams in a format that products other than Microsoft Visio can read. It’s a useful format for transferring diagrams between software applications and retaining editable data.

To export a VSD diagram to VDX:

  1. Create an instance of the Diagram class.
  2. Call the Diagram class’ Save method to write the Visio drawing file to VDX.
The exported VDX file.
todo:image_alt_text

Export from VSD to VSX

VSX is an XML format for defining stencils, the basic objects from which a diagram is built up. When a Visio file is converted to VSX, only the stencils are exported.

To export a VSD diagram to VSX:

  • Create an instance of the Diagram class.
  • Call the Diagram class’ Save method to write the Visio drawing file to VSX.

Export VSD to VTX

TVX is an XML representation of a template file and stores the settings for the document.

To export a VSD diagram to VTX:

  1. Create an instance of the Diagram class.
  2. Call the diagram class’ Save method to write the Visio drawing file in the VTX format.

Export Microsoft Visio Drawing to XML

The code samples show how to export Microsoft Visio Drawing to XML using C#.

Export to XPS

This article explains how to export a Microsoft Visio diagram to XPS using Aspose.Diagram for .NET API. Use the Diagram class’ constructor to read the diagram files and the Save method to export the diagram to any supported image format.

The code snippets in this article takes the diagram below as an input. You can use other diagram formats (VSS, VSSX, VSSM, VDX, VST, VSTX, VDX, VTX or VSX) as well.

The source document.
todo:image_alt_text

To export VSD diagram to XPS:

  1. Create an instance of the Diagram class.
  2. Call the Diagram class’ Save method and set XPS as the output format.

Export Microsoft Visio Drawing to XPS

The code samples show how to export Microsoft Visio Drawing to XPS using C#.

Export a Diagram to SVG

This article explains how to export a Microsoft Visio diagram to SVG (Scalable Vector Graphics) using Aspose.Diagram for .NET API.

Use the Diagram class’ constructor to read the diagram files and the Save method to export the diagram to any supported image format.

To export VSD diagram to SVG, perform the following steps:

  1. Create an instance of the Diagram class.
  2. Call the class’ Save method and set SVG as the export format.

Export Microsoft Visio Drawing to SVG

The code samples show how to export a diagram to SVG using C#.

Export to SWF

This article explains how to export a Microsoft Visio diagram to SWF using Aspose.Diagram for .NET API.

Use the Diagram class’ constructors to read the diagram files and then the Diagram class’ Save method to export the diagram to SWF format. The image below shows the input VSD file that the code renders to SWF. You can use other diagram formats (VSS, VSSX, VSSM, VDW, VDX, VST, VSTX, VSTM, VDX, VTX or VSX) as well.

Input diagram.
todo:image_alt_text

After the code, there’s an image of the output.

To export VSD diagram to SWF::

  • Create an instance of the Diagram class.
  • Call the Diagram class’ Save method and provide SWF format to export your diagram to SWF.

Embedded Viewer Programming Sample

Without Viewer Programming Sample

The SWF file created by these code snippets include an SWF viewer. Exclude the SWF viewer from the file using the following code.

Export a Diagram to XAML

This article explains how to export a Microsoft Visio diagram to XAML (Extensible Application Markup Language) using Aspose.Diagram for .NET API.

Use the Diagram class’ constructor to read the diagram files and the Save method to export the diagram to any supported image format.

To export a VSD diagram to XAML:

  1. Create an instance of the Diagram class.
  2. Call the class’ Save method and set XAML as the export format.

Export Microsoft Visio Drawing to XAML

The code sample show how to export a diagram to XAML using C#.

Convert Visio Drawing with Selective Shapes

Using Aspose.Diagram API, developers can select a group of shapes to convert a Visio drawing into any other supported format. RenderingSaveOptions class offers a Shapes member to maintain the group of shapes. Each save option class is the extended form of RenderingSaveOptions class.

To export a Visio drawing with selective shapes:

  1. Create an instance of the Diagram class.
  2. Create an instance of any SaveOption class to specify settings as narrated here: Specify Visio Save Options
  3. Call Save method of the Diagram class object and pass save option class object as parameter.

Convert Visio Drawing with Selective Shapes Programming Sample

The code sample shows how to export a drawing with selective Visio shapes.