Visio 2013 has (at last) brought us the Metro file format, otherwise known as Open Packaging Conventions (OPC) standard (ISO 29500, Part 2)! You can read about Open Packaging Conventions Fundamentals at http://msdn.microsoft.com/en-us/library/windows/desktop/dd742818(v=vs.85).aspx.
Visio file formats were unchanged for versions 2003, 2007 and 2010, except that Visio 2010 saw the addition of the *.vdw format, which is basically the *.vsd with a XAML overlay added. There were two choices of file formats – the Visio binary format or the verbose DataDiagramML Xml format.
Visio 2013 has done away with the binary file format, but has provided alternative extensions for those documents that contain macros.
So, the process for saving Visio 2013 files is different than before:
In the above example. I added the bVisual logo, just to see how the file would be stored in the new Visio 2013 package. You can view the innards of Metro file by changing the extension to zip, and then just opening it. I also added a simple macro to see how it would be stored
As you can see, the VBA project that contains the macros are in a file called vbaProject.bin, and the logo is a media file, called image1.png. Of course, the vbaProject file will not be present in any non-macro-enabled files.
It all looks quite enticing to open and manipulate using code!
If you want to find out more, then read about [MS-VSDX] at https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-vsdx/50c23601-c943-4ff2-b4a1-02445f52daf0 .
al edlund says
david, I’ll send a note off-line, al
cricstar says
how to download selected callflow pages in visio by using shape reports by using .VSD
davidjpp says
Sorry, I don’t know callflow
Anil says
How can we programmatically save visio document in .vsd format in visio 2013
davidjpp says
Simply use the vsd extension, eg:
Visio.ActiveDocument.SaveAs “C:\Users\David\Documents\Visio Questions\test.vsd”
Rick Sprenkle says
I’ve been trying to use XSD.exe on the released visio 2013 XSD files so that I could utilize an XML deserializer, but I’ve been running into one roadblock after another…is there someone who has released 2013 compatible .cs objects that can be used to serialize / deserialize the open xml formats for visio 2013?
davidjpp says
I guess most people use the Visio Type Library rather than creating their own classes. However, I know that Saveen Reddy has created wrapper classes for these (http://blogs.msdn.com/b/saveenr/ )
The recent addition of vstx support to the Open XML Package Editor is something I want to explore :
http://visualstudiogallery.msdn.microsoft.com/450a00e3-5a7d-4776-be2c-8aa8cec2a75b
Rick Sprenkle says
Thanks David – yes, I’m using the type library presently, however, I run into a problem… I need to process 10’s of GB of drawings every hour (we use visio as a ‘visual programming metaphor’), and the problem with the type library is that you must instantiate a running copy of Visio to read the file. This is fine unless you are running a service. One cannot launch Visio from a service (it requires a non-station 0 interactive session), and we cannot have shared passwords / interactive logins on our server farm. We approached Microsoft for a workaround (we own a ton of MS licenses), but they were not interested in helping us out…
This is why the 2013 open file format is intriguing — we can have developers author in Visio, but compile on our server farm by going against the raw files. Also important is that the raw file reads are much faster than out-of proc calls against Visio, and even in proc calls as an add-on.
I had gotten pretty far with XSD -> CS code. It was just taking a lot of tweaking because XSD.exe cannot handle Schema 1.1 versions, so there are some minor hacks and namespace fixups required. I was hoping someone had found a better way…
Matthew Montes says
Is it possible if we can chat about some issues we been having with our team – Arizona Cardinals Football Club – Thanks for taking the time to read my post!