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

Free Support Forum - aspose.com

Shape shows shape in background

There are different shapes with are handled over Layers, with Shows other shapes in the Background.
Created with Version 17.7. - Tested again tested with Version 17.9. same issue.
Visio_Aspose_Output.zip (334.8 KB)

@roesler,
Kindly share the complete code which you are using to process this VSD drawing. We will investigate and share our findings with you. Your response is awaited.

The code ist:
var diagram = new Diagram(new MemoryStream(visioTemplate));

        foreach (Layer layer in diagram.Pages[0].PageSheet.Layers)
        {
            if (layers[layer.IX])
            {
                layer.Visible.Value = BOOL.True;
                layer.Print.Value = BOOL.True;
            }
            else
            {
                layer.Visible.Value = BOOL.False;
                layer.Print.Value = BOOL.False;
            }
        }

        foreach (Shape shape in diagram.Pages[0].Shapes)
        {
            if (shapeIds.ContainsKey((int)shape.ID))
            {
                var shapeInfo = shapeIds[(int)shape.ID];
                shape.Text.Value.Clear();
                shape.Text.Value.Add(new Txt(shapeInfo.Display));
            }
        }

        var ms = new MemoryStream();

        diagram.Save(ms, SaveFileFormat.PNG);

@roesler,
It appears as you are manipulating a list of layers and shapes in the code, but you have not shared parts of the code where lists have been defined. Please review the code and share all missing parts, so that we could replicate the same scenario in our environment.

you can use the attached visio file without seting layers, they are set. We do not use any longer the shapes. You can use direct the code:
var diagram = new Diagram(new MemoryStream(visioTemplate));
var ms = new MemoryStream();
diagram.Save(ms, SaveFileFormat.PNG);

visioTemplate = attached visio file in the zip

@roesler,
When we converted your source VSD to PNG with Microsoft Visio application, it shows a single shape in the output PNG. Aspose.Diagram API mimics the behavior of the Microsoft Visio application. We have attached output PNG files of Microsoft Visio application MS_RI2_visio.png (378 Bytes) and Aspose.Diagram for .NET API RI2_visio_Out17.9.png (1.7 KB). Kindly let us know which Aspose.Diagram for .NET API version and Microsoft Visio application you are using in your environment.

RI2_visio.zip (285.3 KB)
here is the correct file

@roesler,
We managed to replicate the highlight issues in our environment. It has been logged under the ticket ID DIAGRAMNET-51365 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

@roesler,

The linked ticket ID DIAGRAMNET-51365 has been fixed. Please download and try the new version 17.10 of Aspose.Diagram for .NET API.