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.
Unfortunately, activation email could not send to your email. Please try again.

Connecting between two nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

62887 Jun 25,2007 07:26 AM Jun 25,2007 11:53 PM Windows Forms 2
loading
Tags: Diagram
Carso
Asked On June 25, 2007 07:26 AM

I am using the Essential Studio 5.1.1.0 Diagram, and i was trying to connect two node together using a line.

The exception throw is SystemArgumentException occured in Syncfution.Diagram.Base.dll

I had been working around for hours but no solution. Hope you could help me to look it to it. The C# project file is attached here as well.

Thank you.

Carso.

WindowsApplication413.zip

Meera Fathima [Syncfusion]
Replied On June 25, 2007 07:47 AM


Hello Carso,

Thank you for using Essential Diagram.

It seems the both the head endpoint and tail endpoint of the line connector have the same value and hence the application raises exception. To overcome this issue you need to set the nodes( which are connected using the connector) pinpoint value.

I have added the pinpoint value for circle and polygon node. Below is the modified code snippet for your reference.

// Circle
Syncfusion.Windows.Forms.Diagram.Ellipse circle = new Syncfusion.Windows.Forms.Diagram.Ellipse(0, 0, 96, 72);
circle.PinPoint = new PointF(50, 50); // Set the Pinpoint value.
circle.Name = "Circle";
circle.FillStyle.Type = FillStyleType.LinearGradient;
circle.FillStyle.ForeColor = Color.AliceBlue;
circle.ShadowStyle.Visible = true;
model1.AppendChild(circle);

// Polygon
PointF[] pts ={ new Point(6, 36), new Point(48, 6), new Point(90, 36), new Point(48, 66) };
Polygon polygon = new Polygon(pts);
polygon.PinPoint = new PointF(100, 200); // Set the Pinpoint value.
polygon.Name = "Polygon";
polygon.FillStyle.ForeColor = Color.DarkSeaGreen;
polygon.FillStyle.Color = Color.DarkSeaGreen;
model1.AppendChild(polygon);

// Connector
LineConnector line = new LineConnector(circle.PinPoint, polygon.PinPoint);
model1.AppendChild(line);

polygon.CentralPort.Connect(line.HeadEndPoint);
circle.CentralPort.Connect(line.TailEndPoint);

I hope the above details are helpful to you. Please let me know if you have any more questions.

Thanks,
Meera.

Carso
Replied On June 25, 2007 11:53 PM


Thank you, now i can connect the nodes.

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.

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.

;