Free Support Forum - aspose.com

Add Shape to Diagram using Aspose.Diagram - Shapes lose styling/structure

Hi Support,
I’m using Aspose.Diagram .Net 19.10.0.0
After “AddShape” to the page, all dropped shapes are losing it’s structure/styling as defined in a stencil.
I’ve tried just two simple method calls :

  1. AddShape with size
  2. AddShape without size and SetSize/SetHeight afterwards
    In both cases I’m getting wrong, but different output.

I’ve attached Stencil with masters and two diagrams output examples
AddShapeIssue.zip (158.0 KB)

@Oleg_Sh

Would you please also share the sample code snippet which are using to perform the functionality. We will test the scenario in our environment and address it accordingly.

Hi @asad.ali,

Here is simple implementation that will reproduce the issue. I tried different implementations, but could not achieve the expected result.

    static void Main(string[] args)
    {
        var asposeDiagram = new Diagram();
        var stencilPath = "TestStencil.vssx";
        var masterName = "Data object";

        asposeDiagram.AddMaster(stencilPath, masterName);
        asposeDiagram.Pages[0].AddShape(2, 2, 2, 2, masterName);

        asposeDiagram.Save("TestDrawing.vsdx", SaveFileFormat.VSDX);
    }

Note: all masters from the stencil have similar issue.
It looks like formulas/dependencies of sub-shapes are not triggered.
After manual resizing in Visio, the shape can be normalized in some cases.

@Oleg_Sh

Thanks for sharing sample code snippet.

We were able to replicate the issue in our environment using Aspose.Diagram for .NET 19.11 and logged it as DIAGRAMNET-51732 in our issue tracking system for the sake of correction. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as DIAGRAMNET-51732) have been fixed in Aspose.Diagram for .NET 19.12.

Hi support,

The issue was fixed only for one Master “Data object” in attached stencil, but unfortunately it still exists for other Masters.
I previously mentioned that issue exists for all masters in a stencil (there is 4)

@Oleg_Sh

We have re-opened the ticket and logged your concerns as well. We will let you know as soon as we have some additional updates in this regard. Please spare us little time.

We are sorry for the inconvenience.

Hi Asad,

We can also provide few templates with masters reproducing the issue, so you can do a more detailed testing. Can I send this templates to you in a private, so it is not publicly shared ?

@Oleg_Sh

Sure, please send them in a private message.

Hi Support,

Do you have any updates to this issue?
We are interested in purchasing, but this issue is blocking us.

@Oleg_Sh

We would like to share with you that the ticket is under the phase of investigation and as soon as it is resolved, we will surely update you. We have recorded your concerns and will surely consider them during the ticket analysis. We highly appreciate your patience in this matter. Please give us some time.

We are sorry for the inconvenience.

Aspose.Diagram21.3.2.zip (8.9 MB)
@Oleg_Sh
Please try the latest fix 21.3.2. We have fixed this issue in the fix.
Thanks.

Thank you, Philip.

I tested a new version on our Visio templates and couldn’t see any issues.
I am very glad it is fixed!

Hi Philip,

Can you please tell me an approximate date when this version will be released?

Thanks,
Oleg

@Oleg_Sh

The next API update i.e. 21.4 will be rolled out in the April 2021 (End of first week or during 2nd week). You will be notified once the release is available.