Invalid shape Height, Width, LocPinX and LocPinY

Hi Support,

Aspose.Diagram v.25.10.0 returns wrong size values of TwoD Shapes. (Width, Height, LocPinx, LocPinY).
I am using following code example:

    static void Main(string[] args)
    {
        var document = new Diagram("Invalid size returned.vsdx");
        var page = document.Pages[0];
        var twoDShapes = page.Shapes.OfType<Shape>().Where(x => x.TwoD).ToList();

        foreach (var twoDShape in twoDShapes)
        {
            Console.WriteLine("Shape Height: " + twoDShape.XForm.Height.Value);
            Console.WriteLine("Shape Width: " + twoDShape.XForm.Width.Value);
            Console.WriteLine("Shape LocPinX: " + twoDShape.XForm.LocPinX.Value);
            Console.WriteLine("Shape LocPinY: " + twoDShape.XForm.LocPinY.Value);
        }
    }

I am getting following invalid result:
Shape Height: -1,79769313486232E+308
Shape Width: -1,79769313486232E+308
Shape LocPinX: -1,79769313486232E+308
Shape LocPinY: -1,79769313486232E+308
Shape Height: -1,79769313486232E+308
Shape Width: -1,79769313486232E+308
Shape LocPinX: -1,79769313486232E+308
Shape LocPinY: -1,79769313486232E+308

Can you please take a look? Visio diagram attached.
Invalid size returned.zip (22.1 KB)

Thanks in advance!

@Oleg_Sh

It appears you are facing an issue with invalid size values for 2D shapes in your Visio diagram using Aspose.Diagram. The values you are encountering (e.g., -1.79769313486232E+308) suggest there may be a problem with how the shape dimensions are being interpreted.

Here are several steps to troubleshoot this issue:

  1. Check the Shape Properties: Verify that the shapes in your Visio file have valid dimensions set. Shapes without defined dimensions can lead to extreme values.

  2. Update Aspose.Diagram: Ensure you are using the latest version of Aspose.Diagram. If you are currently on version 25.10.0, consider updating to a newer version, as updates often include bug fixes.

  3. Inspect the Diagram File: Open the Visio file in Microsoft Visio to check if the shapes display correctly. If they do not, the issue may originate from the Visio file itself.

  4. Debugging: Implement additional logging to verify that the shapes are being processed correctly before accessing their dimensions. For instance, log the shape IDs or names to confirm they are being read accurately.

  5. Contact Support: If the issue persists, consider reaching out to Aspose support with the Visio file attached for further assistance.

If you require further help with specific code adjustments or additional debugging tips, please feel free to ask!

@Oleg_Sh
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53823

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.