Skip to main content

Convert BPMN 2.0 diagrams to Microsoft Visio (.vsdx) files — zero dependencies, pure Python

Project description

BPMN to Visio (.vsdx) Converter

Convert BPMN 2.0 diagrams to Microsoft Visio files — zero dependencies, pure Python.

PyPI version Python 3.7+ MIT License GitHub stars


bpmn-to-visio converts BPMN 2.0 XML files (from bpmn.io, Camunda Modeler, Signavio, etc.) into Microsoft Visio .vsdx files — preserving the exact layout, shapes, and styling from your BPMN modeler.

No Visio installation required. No external dependencies. Just Python 3.7+.

BPMN 2.0 XML  ──►  Visio .vsdx
   (.bpmn)          (Open XML)

Why?

  • Your team uses bpmn.io or Camunda Modeler for process modeling, but stakeholders need Visio files
  • You have dozens or hundreds of BPMN diagrams to deliver in Visio format
  • Manual recreation in Visio is slow, error-prone, and doesn't scale
  • Existing tools require paid licenses or don't preserve layout

This converter solves all of that with a single Python script.

Features

  • Zero dependencies — uses only Python standard library (no pip packages needed)
  • Layout preservation — reads BPMN diagram coordinates to reproduce exact positions
  • Full BPMN support — pools, lanes, tasks, events, gateways, sequence flows, message flows, annotations
  • Color preservation — reads bioc:fill / bioc:stroke attributes from bpmn.io
  • Batch conversion — convert entire folders of BPMN files in one command
  • Visio Desktop compatible — outputs valid VSDX Open XML packages with proper text rendering

Supported BPMN Elements

BPMN Element Visio Shape
Start Event Green circle
End Event Red bold circle
Intermediate Events (Timer, Message, Signal) Orange circle
Task / User Task / Service Task Rounded rectangle
Sub-Process / Call Activity Rounded rectangle
Exclusive Gateway Diamond with "X"
Parallel Gateway Diamond with "+"
Inclusive Gateway Diamond with "O"
Event-Based Gateway Diamond
Pool (Participant) Rectangle with vertical header band
Lane Rectangle with vertical header band
Text Annotation Open bracket with text
Sequence Flow Solid arrow
Message Flow Dashed arrow
Association Dotted line

Installation

Option 1: pip (recommended)

pip install bpmn-to-visio

Option 2: Clone the repo

git clone https://github.com/Mgabr90/bpmn-to-visio.git
cd bpmn-to-visio

Python 3.7+ is required. No additional packages needed.

Usage

Single file

bpmn-to-visio diagram.bpmn

Or if running from source:

python bpmn_to_vsdx.py diagram.bpmn

Output: diagram.vsdx in the same directory.

Custom output directory

bpmn-to-visio diagram.bpmn -o output/

Batch conversion

Convert all .bpmn files in a folder (recursively):

bpmn-to-visio --batch ./bpmn-files/

Output .vsdx files are placed next to each .bpmn source, or in the directory specified by -o.

Python API

from bpmn_to_vsdx import convert_bpmn_to_vsdx

convert_bpmn_to_vsdx("process.bpmn", output_dir="output/")

How It Works

  1. Parse — Extracts BPMN elements, flows, and diagram coordinates from the XML
  2. Transform — Converts BPMN coordinates (top-left origin, pixels at 96 PPI) to Visio coordinates (bottom-left origin, inches)
  3. Generate — Builds the VSDX Open XML package (ZIP of XML files) with shapes, connectors, and styling

The converter reads bpmndi:BPMNShape bounds and bpmndi:BPMNEdge waypoints to preserve the exact layout from your BPMN modeler.

Compatibility

BPMN Source Status
bpmn.io Fully supported
Camunda Modeler Fully supported
Signavio Supported
Bizagi Modeler Supported (BPMN 2.0 export)
Any BPMN 2.0 compliant tool Supported
Visio Target Status
Visio Desktop (2016+) Fully supported
Visio Online / Web Supported
LibreOffice Draw (.vsdx import) Basic support

Limitations

  • Intermediate events render as single circle (no double-circle border)
  • No task-type icons (user task, service task, etc. render as plain rounded rectangles)
  • Message flow source end lacks open-circle marker
  • No support for collapsed sub-processes or event sub-processes
  • Groups and data objects are not rendered

Contributing

Contributions are welcome! Please open an issue or pull request.

License

MIT — Mahmoud Gabr

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bpmn_to_visio-1.1.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bpmn_to_visio-1.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file bpmn_to_visio-1.1.0.tar.gz.

File metadata

  • Download URL: bpmn_to_visio-1.1.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bpmn_to_visio-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b523ff5c102550b85c4b14d79a66bed09618060989411f3b214b0ca7f5ddc83f
MD5 172c4e030cb1f2d30244e9490146bc8c
BLAKE2b-256 462ba16dbaedd66e493e0dcd335e6f9737ff731954a33b454419c81523b45f99

See more details on using hashes here.

File details

Details for the file bpmn_to_visio-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: bpmn_to_visio-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bpmn_to_visio-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca6c06ba41d407c7b066f8af848115ccbc145e0d43d4243ad5358f6b82b6be43
MD5 91054046a053cef9b78c5b27313cb433
BLAKE2b-256 7ab122aef459762d752fd543a21f55a9fccf8ac9958453a6cded73c4044c54f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page