Diagram / Import and Export / Import / Visio Import
In This Topic
    Visio Import
    In This Topic

    NOV Diagram lets you import Visio Drawings in Visio Drawing (VSDX) and Visio 2003-2010 Binary Drawing (VSD) formats, as well as Visio Stencils in the VSSX format.

     Import from File

    To import a drawing from a Visio Drawing (VSDX) or a Visio 2003-2010 Drawing (VSD) local file use the LoadFromLocalFile method of the drawing view, for example:

    Importing Visio Drawing from file
    Copy Code
    drawingView.LoadFromLocalFile(@"D:\Documents\VisioDrawing.vsdx");
    

    To import a Visio Stencil in a library view, use the following piece of code:

    Importing Visio Stencil from file
    Copy Code
    libraryView.LoadFromLocalFile(@"D:\Documents\VisioStencil.vssx");
    

    You can also use the LoadFromFileAsync methods to import a Visio Drawing or a Stencil from file. That method runs asynchronously and returns a promise.

     Import from Stream
    Importing Visio Drawing from stream
    Copy Code
    drawingView.LoadFromStream(stream, NDrawingFormat.Visio);
    

    To import a Visio Stencil in a library view, use the following piece of code:

    Importing Visio Stencil from stream
    Copy Code
    libraryView.LoadFromStream(stream, NLibraryFormat.Visio);
    
    See Also