How do I edit text in Visio files (vsdx) using python?

7.9k views Asked by At

I am trying to automate some translation work where I just need edit all the texts in Visio (vsdx) files, the diagram does not need to be changed.

I have been searching for ways to perform such action but I can't find anything useful.

How do I import vsdx to python, edit texts globally then export a vsdx?

1

There are 1 answers

6
Sergei Danielian On BEST ANSWER

First of all, you should read more about VSDX Drawing File Format. Here are several references:

  1. Visio VSDX Drawing File Format
  2. Introduction to the Visio file format (.vsdx)
  3. Manipulate the Visio file format programmatically

Also, get familiar with Open Packaging Conventions and XML or ECMA 376 - this standard the new vsdx is based on (tiny hint: vsdx is a usual archive).

After that you will figure out that basically there are a lot of libraries written even in python that works in some way with vsdx.

Update: as Nikolay politely noted, actually there are no so many libraries to work with this kind of files. So, my wording here (a lot of) is simply incorrect. On the contrary, there are few articles explaining how to deal with the vsdx format.