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.
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:strokeattributes 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
- Parse — Extracts BPMN elements, flows, and diagram coordinates from the XML
- Transform — Converts BPMN coordinates (top-left origin, pixels at 96 PPI) to Visio coordinates (bottom-left origin, inches)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bpmn_to_visio-1.1.1.tar.gz.
File metadata
- Download URL: bpmn_to_visio-1.1.1.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b979749bae80db0e6f05bd04a9710d96672967498c864e6f5c82d1e51225832
|
|
| MD5 |
b8ecf74ea1850078a2317292242806b5
|
|
| BLAKE2b-256 |
db90e0084e4298ece7764f9745ea5b96704cebc2b0b86fb6a9bab1f8f23a4096
|
File details
Details for the file bpmn_to_visio-1.1.1-py3-none-any.whl.
File metadata
- Download URL: bpmn_to_visio-1.1.1-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb374d2d32b828ec68faab739c5a5183108662a4e02f2a00b23a8f3c245667a
|
|
| MD5 |
628ec674976a3d3186a4cf46615a033e
|
|
| BLAKE2b-256 |
13cc855da2612a361d0550b96049cf4c5de1a0f692cba5a8c3363ebf4246c965
|