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.