We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception when saving .vsd to a .vdx

Hi,



When trying to save a .vsd to a .vdx the following exception occurs.



An unhandled exception of type ‘Aspose.Diagram.DiagramException’ occurred in Aspose.Diagram.dll



Additional information: Error in element Pages in \VisioDocument. SavePages



Using the following code:

Dim objVisioDocument As New Aspose.Diagram.Diagram(TextBox1.Text)

objVisioDocument.Save(SaveLocation, Aspose.Diagram.SaveFileFormat.VDX)



This happens in version 6.0.0 and version 5.9.0

I’ve added the .vsd where the exception occurs.



Thanks in advance

Hi Hilbert,


Thank you for contacting support and using Aspose.Diagram API. We’ve evaluated your sample Visio against the most recent version 6.0.0 of Aspose.Diagram for .NET API. We could not replicate this error message on our side. We have attached the resultant VDX file to this reply. Please recheck and if the message is reproducible, then please give us your working environment details. It’ll help us in imitating the error message, please reply to the following questions:

  • What is the version of the Operating System and edition, etc.
  • What is the .NET version and application type?
  • What is the Visual Studio version and edition?
  • What is the local language of the Operating System?
  • Any other information that you think is necessary.

It would be great if you can prepare and give us a sample application which reproduces the error message. We’re looking forward to help you.

Hi,



Thank you for the fast reply, I’m using the following:

- Windows 8.1 Pro

- .NET Framework 4.6.1

- Visual Studio Premium 2013 Version 12.0.40629.00 Update 5

- English



I have added a simple test application with the used Diagram version and .vsd file.



Thanks again,

Erik

Hi Erik,


Thank you for supplying the zip archive of the application project. This error message only occurs without applying the valid Aspose license. However, when the Aspose license is applied, it works perfect. Please apply license by adding a couple of the lines as below and let us know how it goes on your side:

[.NET, VB]
’ load license
Dim lic As New Aspose.Diagram.License()
’ apply license
lic.SetLicense(“C:\temp\Aspose.Total.lic”)
' load Visio
Dim objVisioDocument As New Aspose.Diagram.Diagram(TextBox1.Text)
' save in the VDX format objVisioDocument.Save("c:\temp\Process.vdx", Aspose.Diagram.SaveFileFormat.VDX)

Hi,

After applying the license it indeed works as expected. Thank you for your help.

Hi Erik,


Thank you for the confirmation. It is nice to hear from you that the problem has been resolved. Please let us know if you require any further assistance, we will be happy to help you.