Different Ways to Open Files

Opening a File via a Path

Developers can open a Microsoft Diagram file using its file path on the local computer by specifying it in the Diagram class constructor. Simply pass the path in the constructor as a string. Aspose.Diagram will automatically detect the file format type.

Opening a File via a Stream

It is also simple to open an Visio file as a stream. To do so, use an overloaded version of the constructor that takes the BufferStream object that contains the file.

Opening a File with LoadOptions

To open a file with loadoptions, use the LoadOptions classes to set the related options of the classes for the template file to be loaded.