Im trying to get shapes from Visio project in vector format. It is possible to do it from Visio UI, but Im unable to accomplish it programmatically. My code looks like:
foreach (Visio.Master master in doc.Masters)
{
imageName = master.NameU;
string imageFileName = Path.Combine(@"c:\temp", imageName);
master.Export(imageFileName + ".svg");
}
Function Export detects passed file extension and export shape in to this format. It works correct for any raster format like bmp png etc. I can get project's shapes as raster files w/o problems. If I pass a format like emf or wmf it also saves all files and they are actually in wmf/emf format. But they have embedded raster images, so in fact they are raster.
And the last surprise - if I pass svg extension, all exported files are empty except a few ones. These ones are really not empty svg but they show the whole visio page! Not a single shape. One svg file for every project's page. This is not what I want.
So please help me - how to get every shape in vector format from visio programmatically.