How to read a microsoft visio file using python. Python vsdx library is not giving connections details between blocks. My requirement is to read the microsoft visio file and understand the shapes, connections between blocks and know the shape/color of the blocks. Please help me with relevant information’s.
Thanks,
Karthikesan
It does:
>>> from urllib.request import urlretrieve
>>> urlretrieve(r"https://github.com/dave-howard/vsdx/raw/master/tests/test4_connectors.vsdx", "test4_connectors.vsdx")
('test4_connectors.vsdx', <http.client.HTTPMessage object at 0x0000025D0714C890>)
>>> import vsdx
>>> with vsdx.VisioFile("test4_connectors.vsdx") as v:
... print(v.pages[0].connects)
...
[Connect: from=7 to=5 connector_id=7 shape_id=5, Connect: from=7 to=2 connector_id=7 shape_id=2, Connect: from=6 to=2 connector_id=6 shape_id=2, Connect: from=6 to=1 connector_id=6 shape_id=1]