"Specified method is not supported" error when trying to load VDX file in Aspose Diagram using Stream

I have tried these lines but it’s not work for me.

visioDiagram = new Aspose.Diagram.Diagram(streamReader.BaseStream);


visioDiagram = new Aspose.Diagram.Diagram(streamReader.BaseStream,LoadFileFormat.Vdx);

Blank Diagram (1).zip (7.0 KB)


We could not notice any issue in our environment while using the code like below:

var d = new Aspose.Diagram.Diagram(dataDir + "Blank Diagram (1).vdx");

Could you please try using the file path? In case issue still persists, please share the complete method where you are reading file as stream so that we can further proceed to assist you accordingly.

We want to use Stream only as per our application architecture. Using Stream we are able to use the VSDX files. Previously we were using the file path and it was working fine. Is that something you can resolve from your end so that we can use the Stream constructor rather than the file path?


We also tried using stream like below and did not notice any issues:

var d = new Aspose.Diagram.Diagram(new FileStream(dataDir + "Blank Diagram (1).vdx", FileMode.Open), Aspose.Diagram.LoadFileFormat.Vdx);

Could you please make sure to use the latest version of the API. Please share your code snippet where you are reading the files using streams in case you still face any issues. We will further proceed accordingly.