Free Support Forum -

Support to identify any connector overlapping with other shapes (C#)


I have next issue.
While I’m building charts consisting of shapes and connectors (curved, bent, straight connectors) I’m facing situations when connectors are overlapping some of shapes.


using (var presentation = new Presentation())
            var slide = presentation.Slides[0];
            var primaryShape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 150, 50, 100, 30);
            primaryShape.TextFrame.Text = "shape 1";
            var targetShape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 350, 250, 100, 30);
            targetShape.TextFrame.Text = "shape 2";

            var intersectedShape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 300, 180, 100, 30);
            intersectedShape.TextFrame.Text = "intersected shape";

            var arrow = slide.Shapes.AddConnector(ShapeType.CurvedConnector2, 0, 0, 10, 10, true);
            arrow.LineFormat.FillFormat.FillType = FillType.Solid;
            arrow.LineFormat.FillFormat.SolidFillColor.Color = System.Drawing.Color.Red;
            arrow.StartShapeConnectionSiteIndex = 3;
            arrow.StartShapeConnectedTo = primaryShape;
            arrow.EndShapeConnectedTo = targetShape;
            arrow.EndShapeConnectionSiteIndex = 0;

            presentation.Save(fileNameToSave, Aspose.Slides.Export.SaveFormat.Pptx);

Here the connector will overlap with shape ‘intersected shape’.
Issue 1) I don’t know when connector is overlapping some particular shape. I haven’t found in documentation any way to understand that. Also the connector itself provides only the connector frame, but I don’t know what is the exact connector shape line and in which point it crosses the underlying shape.

Issue 2) I cannot increase the curvature or set the bent point manually. Is there any known way to do that?

Is there any plan to add such functionality in nearest future since it is crucial for our project?
We are trying to build clear charts avoiding any connector intersections.

Thank you


I have observed your requirements. Can you please share the generated presentation on your end along with desired output presentation that you want to get using Aspose.Slides. We will try to investigate the requirements based on shared information to help you out.


Please find example PPTs (46.5 KB)


I have observed your requirements and regret to share that there is no such provision in API that may assist if there is any shape intersecting the path of added connector between two shapes. Please feel free to share with us if there is any further we may help you.


We have created a new feature request in our issue tracking system with ID SLIDESNET-41675 that would return Coordinates of connector points on slide. Using these points you may draw arbitrary line and devise your own logic if that line passes through any of already added shape. I hope this feature will be helpful to you when implemented.

Good news. Is there any estimation on how many months it may take to be released?
Will it provide coordinates of all points of the connector line or only the start and the end points?
Thank you


The tentative ETA for the feature support is Aspose.Slides for .NET 20.2. We will share the good news with you as soon as the feature will be available in API and request for your patience in this regard.

1 Like