We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OrgLineConnector Link change the route and bending direction

Thread ID:

Created:

Updated:

Platform:

Replies:

143100 Mar 5,2019 04:48 AM UTC Mar 7,2019 04:46 AM UTC WinForms 5
loading
Tags: Diagram
Unknown
Asked On March 5, 2019 04:48 AM UTC

Hi,

Currently we are evaluating syncfusion for winform flow diagram now
I am trying to connect two rectangles in a diagram builder with a OrgLineConnector link.
I need to connect right side of first node with left side of second node.
The connector is bended first down then right then down again and as you can see in the attached screenshot it does not look good.
I need it to got straight to the right first then down then right again to meet the second rectangle.
Can you please let me know how I can change that default behaviour?
Thanks & Regards,
Sumit

Attachment: orglineScreenShot_ed57621a.zip

Ramya Thirugnanam [Syncfusion]
Replied On March 5, 2019 10:06 AM UTC

Hi Sumit,  
 
We have support to achieve the requirements with Line routing feature of the diagram. Please enable Line Routing with distance as 10 to achieve your requirement. We have provided the code example, screenshot and help documentation link. Please refer to them as below.   
  
Code example for routing:  
  
//enabling for model  
this.diagram1.Model.LineRoutingEnabled = true;  
  
//enabling for link object  
link.LineRoutingEnabled = true;  
  
this.diagram1.Model.LineRouter.DistanceToObstacles = 20;  
this.diagram1.Model.LineRouter.RoutingMode = RoutingMode.Automatic;  
 
 
 
 
 
  
Regards,  
Ramya T  


Unknown
Replied On March 6, 2019 05:46 AM UTC

Hi Ramya,


Thanks for update

I have already set LineRoutingEnabled property true to line and diagram model but issue occurred when i  moving nodes.


Thanks & Regards,
Sumit

Ramya Thirugnanam [Syncfusion]
Replied On March 6, 2019 08:57 AM UTC

Hi Sumit, 
 
Thanks for your update. 
 
We have created the sample and video to represent the issue. Could  you please validate the sample and video whether these represents your issue? if not, please provide us the sample or video to represent the issue. this will help us to serve you better. 
 
Sample link:
Routing
 
 
Video link:
Routingissue
 
 
Regards, 
Ramya T 


Unknown
Replied On March 6, 2019 09:19 AM UTC

Hi Ramya,

Thanks for update

I have attached screen shot of issue occurred in your provided sample solution.

Thanks & Regards,
Sumit

Attachment: TestScreenShot_95bc2c12.zip

Ramya Thirugnanam [Syncfusion]
Replied On March 7, 2019 04:46 AM UTC

Hi Sumit, 
 
Please set HeadingHead and HeadingTail directions for the connector. So that, the connector connected to first and second node properly. Please find below code example for how to set connector directions. 
 
OrgLineConnector connector = new OrgLineConnector(new System.Drawing.PointF(10, 200),         new System.Drawing.PointF(300, 250)); 
         // Here cp1 and cp2 are connection point 
            cp.TryConnect(connector.HeadEndPoint); 
            cp1.TryConnect(connector.TailEndPoint); 
            connector.HeadingHead = CompassHeading.East; 
            connector.HeadingTail = CompassHeading.West; 
            diagram1.Model.AppendChild(connector); 
 
 
Regards, 
Ramya T 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon