Nevron Open Vision Documentation
Visio Drawing Export

NOV Diagram lets you easily save your drawing documents to Visio Drawings in VSDX format.

Save to File or Stream Directly

To save directly to a Visio Drawing file call any of the SaveToFile or SaveToStream methods of the drawing view, for example:

Save to Visio Drawing File
Copy Code

Save to Visio Drawing Stream
Copy Code
drawingView.SaveToStream(stream, new NVisioDrawingFormat());

If you want to customize the Visio drawing export process you can pass an NVisioDrawingSaveSettings instance to the Save method. It contains the following properties:

Using Visio Drawing save settings
Copy Code
NVisioDrawingSaveSettings visioSaveSettings = new NVisioDrawingSaveSettings();
visioSaveSettings.CompressionLevel = ENCompressionLevel.BestSpeed;
visioSaveSettings.EmbedPreview = false;
view.SaveToFile(@"D:\Documents\VisioDrawing.vsdx", new NVisioDrawingFormat(), visioSaveSettings);

The example above configures the Visio Drawing export for maximum performance by setting the CompressionLevel to BestSpeed and disabling the generation and embedding of document preview in the resulting Visio package.

Show Save File Dialog

To show the standard Save File dialog with "Visio Drawing" file type selected by default, use the following overload of the SaveToFile method:

Save File dialog with Visio Drawing selected by default
Copy Code
NVisioDrawingFormat visioDrawingFormat = new NVisioDrawingFormat();
drawingView.SaveToFile(visioDrawingFormat, null);

To show a Save File dialog with only "Visio Drawing" as a file type, then you should get and execute the export to Visio command action:

Save File dialog with only Visio Drawing file type
Copy Code
NCommandAction exportToVisioAction = drawingView.Commander.GetCommandAction(NDrawingView.ExportToVisioDrawingCommand);
exportToVisioAction.Execute(drawingView, NCommand.EmptyParameter);


See Also


Send Feedback