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

Free Support Forum - aspose.com

Convert VSD to SVG using C#

I’m converting vsd and vsdx files to svg with Diagram.Save method, and several shapes and lines do not convert properly - lines loose their custom style and shapes usually get a different position. Vsd examples in attached archive
Test.zip (56.4 KB)
I am using Aspose.Diagram for .Net , ver.22.1 , license is also valid.
Everything else on original documents is converted as expected.


We were able to replicate the similar issue in our environment while converting VSD/VSDX to SVG using Aspose.Diagram for .NET 22.1. Hence, an issue as DIAGRAMNET-52636 has been logged in our issue tracking system for the sake of correction. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello again @asad.ali!
I found more shapes and lines , that move or change appearance after converting.
Please add them to the issueshapes2.zip (112.0 KB)


Another ticket as DIAGRAMNET-52638 has been logged in our issue tracking system to investigate the issue related to your recently shared files. We will further look into it and let you know as soon as it is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.


We have initially investigated the logged ticket and we are afraid that we cannot support drawing with more complex custom-styled lines at the moment. We will look further into it. Also, when you manually use Microsoft Visio to save as SVG, the files generated by Microsoft will not draw these lines.

I see, thank you! What about shapes changing position, could this be fixed?


The other issue has been logged under the ticket ID DIAGRAMNET-52636 and is being investigated at the moment. We will let you know once it is resolved.

Regarding custom lines conversion - how can I programmatically determine line has custom style?


We are investigating your requirements and will get back to you with feedback as soon as the investigation is complete. Please spare us some time.

Please refer to the following code to detect custom line style :

          //Get page of diagram
        Page page = diagram.Pages[0];
        foreach (Shape shape in page.Shapes)
                //get shape's inherit line
                Line line = shape.InheritLine;
                int pattern = line.LinePattern.Value;
               //when line's pattern is 254,it is a custom line from master.
                if (pattern == 254)

For more information please refer to the following documents:

1 Like

Is it possible to extract line pattern name - because sometimes it doesn’t show up as shape.Name or shape.Master.NameU (because Master is null )?no_name_inherits.zip (31.1 KB)


In that case, please try to get shape.Line Property and see if it fulfils your requirements. Please let us know if you need more information.

shape.Line property doesn`t include the name of the pattern / master line as it appears in Dash type in Visio.
As example above suggested I’m iterating through shapes , but shape.Master is null and shape.InheritLine throws an System.NullReferenceException.
shape.Line.LinePattern.Value does show up as 254
Please test the file attached in my previous message


Another investigation ticket as DIAGRAMNET-52663 has been logged in our issue management system to analyze your this requirement. We will let you know as soon as the ticket is resolved. Please give us some time.

The issues you have found earlier (filed as DIAGRAMNET-52663) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou