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

Free Support Forum - aspose.com

[Aspose.Diagram] Layout is not correct

I am trying to create a page with several nodes but when I increase node count to let’s say 30 the layout of those nodes starts to be messed up. Multiple nodes are on the same location, connections are passing on top of other nodes…
You can see the problem here in the screenshots

nodes behind node.jpg (68.8 KB)
more errors.jpg (63.9 KB)

Here is a sample project that produces this errors.
AsposeSample.zip (2.2 MB)

Is there some way to produce the visio file without those errors or are those things that needs to be fixed?



Kindly send us your stencil file VisioStencilTemplate.vss which you are using in the code. Your response is awaited.

Here it is
VisioStencilTemplate.zip (36.7 KB)


We have created an output VDX with the latest version 18.1 of Aspose.Diagram for .NET API and unable to find the issues as highlighted in the snapshots. Kindly view this output VDX OrganigramOutput.zip (27.3 KB) and let us know for any problematic area of the drawing. Please also let us know about the Visio application version which you are using to view it.

With what program are you viewing the output file? I just opened your output in Visio Viewer 2016 and the same problems are present.
Visio viewer 2016.JPG (49.6 KB)

I have also opened your output file in Visio 2016 and the problem with connections crossing over the node are NOT present but the position of the nodes are still a problem (multiple nodes in the same position)
Visio 2016.PNG (23.3 KB)
Try moving the node 100006 a bit (which is positioned on the far right) and you will see that there are in fact two nodes in that same place. The same is true for a few more nodes.


We have logged an investigation under the ticket ID DIAGRAMJAVA-50590 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

1 Like


The linked ticket ID DIAGRAMJAVA-50590 has been fixed and will be included in the next version 18.5 of Aspose.Diagram for Java API. We will notify you once the next version is published.

Thank you for the reply but the error was for .NET library and not Java. Will you make the same fix in .NET release?


We auto-port Aspose.Diagram for Java API from its equivalent .NET version. It is also fixed in the version 18.5 of Aspose.Diagram for .NET API. The next version 18.5 will be published in a couple of weeks. If you come across any problem with the next version 18.5, then kindly let us know.

1 Like

The issues you have found earlier (filed as DIAGRAMJAVA-50590) have been fixed in Aspose.Diagram for Java 18.5. This message was posted using BugNotificationTool from Downloads module by imran.rafique


It seems that you only sort of fixed the problem. It was fixed for the example I provided but when I used a new Aspose.Diagram for my project the problems were still there. This has been the case for all of the issues I reported for the past few years (for the same project), every time I would try to make a simplified sample project of only a few diagram nodes for my problem and you would fix only that exact issue which at the end didn’t work for the whole diagram.
So I have decided to make another sample project, this time I included the whole diagram and a small Windows Forms interface for selecting different parameters for diagram visio export:
AsposeSample.zip (4.5 MB)

I am using Microsoft Visio Viewer 2016, not the full Visio version since our clients have only Viewer, so please test it in Visio Viewer first (full visio version should also work)


  1. When opening exported diagram, it is not centered:
    Not centered.JPG (35.7 KB)

  2. Some lines are going across some of the nodes, here is the example
    Lines across node.png (28.8 KB)
    To get the same issue like on the image I used the following parameters in my sample app:
    Levels to load: 8
    Levels per page: 3

On the provided picture you can see the issue present on nodes 8 and 19. However there are a lot more nodes where this is happening (for parameters 8 and 3), some of which are nodes 24, 32, 146, 152, 157 and a lot more. Please don’t just fix the issue on those nodes but find out why the problem is happening so that it will be fixed on all nodes. Also test it on different parameters, not just 8 and 3

  1. Some nodes are on top of each other, here is some of the examples when I used these parameters:
    Levels to load: 8
    Levels per page: 3
    on top of each other 01.png (4.8 KB)
    (to get to this page follow: node 1 -> node 8 -> node 151)

on top of each other 02.png (35.8 KB)
(to get to this page follow: node 1 -> node 12 )

The higher the “Levels per page” parameter, the worse it gets. This is the example when using:
Levels to load: 8
Levels per page: 6
on top of each other 03.png (75.0 KB)
as you can see, the whole diagram is unreadable.

Please try out various parameters and see why it is happening, I hope I don’t have to provide screenshot for every instance where this is happening (because it will take a long time). The only time that this issue does not happen is when using “Levels per page = 2”

Please let me know if you need anything else.

Thank you!


We managed to replicate the said issues in our environment. An investigation has been logged under the ticket ID DIAGRAMNET-51495 in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

1 Like