SetConnectorJumpValue does not work properly

Cmany.zip (24,6 kB)

Hi,

I try to draw connectors with a specified jump style. For this I am using youre new method SetConnectorJumpValue. However, it does not work as expected, it behaves differently acoording to the sequence I am calling it.

When I have the code bellow, the jump is not displayed properly. However, after I open the Visio file and if I move a shape, all the connectors are diplayed with the jump settings:
Shape shape1 = page.Shapes.GetShapeIncludingChild(index1);
Shape shape2 = page.Shapes.GetShapeIncludingChild(index2);
Aspose.Diagram.Shape connector1 = new Aspose.Diagram.Shape();
diagram.AddShape(connector1, connectorMaster, 0);
connector1.SetConnectorJumpValue(ConLineJumpCodeValue.Always, ConLineJumpStyleValue.Arc);
page.ConnectShapesViaConnector(shape1, ConnectionPointPlace.Right, shape2, ConnectionPointPlace.Left, connector1);

The code bellow works properly, when I call the SetConnectorJumpValue method AFTER I connect the shapes:
Shape shape1 = page.Shapes.GetShapeIncludingChild(index1);
Shape shape2 = page.Shapes.GetShapeIncludingChild(index2);
Aspose.Diagram.Shape connector1 = new Aspose.Diagram.Shape();
diagram.AddShape(connector1, connectorMaster, 0);
page.ConnectShapesViaConnector(shape1, ConnectionPointPlace.Right, shape2, ConnectionPointPlace.Left, connector1);
connector1.SetConnectorJumpValue(ConLineJumpCodeValue.Always, ConLineJumpStyleValue.Arc);

Even the code works properly, it is extremly slow when the report contains hundreds of connectors. If you run the code bellow with the attached file, it takes a couple of HOURS to execute, basically it is unusable.

Please, provide a solution fast enough to have connectors diplayed correctly with the coded jump style, even when the reports have hundred of connectors.

string connectorMaster = “Connector”;

        Diagram diagram = new Diagram(fileName);

        Aspose.Diagram.Page page = diagram.Pages[0];

        for (int k = 0; k < 4; k++)
        {
            int index1 = 1+k;
            int index2 = 500-k;

            for (int i = 0; i < 49; i++)
            {
                Shape shape1 = page.Shapes.GetShapeIncludingChild(index1);
                if (shape1 == null)
                    continue;
                Shape shape2 = page.Shapes.GetShapeIncludingChild(index2);
                if (shape2 == null)
                    continue;
                Aspose.Diagram.Shape connector1 = new Aspose.Diagram.Shape();
                diagram.AddShape(connector1, connectorMaster, 0);
                page.ConnectShapesViaConnector(shape1, ConnectionPointPlace.Right, shape2, ConnectionPointPlace.Left, connector1);
                connector1.SetConnectorJumpValue(ConLineJumpCodeValue.Always, ConLineJumpStyleValue.Arc);

                index1 += 10;
                index2 -= 10;
            }
        }

        // Save visio diagram
        diagram.Save(fileName, SaveFileFormat.Vsdx);

@zkormos
Thanks for the template file and sample codes.
We reproduced the problems you mentioned .
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-53519

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.

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