Hi,
To prevent the connectors from overlapping, you should modify the offset of their start and end plugs. Take a look at the following example and especially on the lines in bold:
NBasicShapesFactory factory = new NBasicShapesFactory();
factory.DefaultSize = new NSizeF(100, 100);
NShape shape1 = factory.CreateShape(BasicShapes.Rectangle);
shape1.Text = "Shape 1";
shape1.Location = new NPointF(100, 100);
document.ActiveLayer.AddChild(shape1);
NShape shape2 = factory.CreateShape(BasicShapes.Rectangle);
shape2.Text = "Shape 2";
shape2.Location = new NPointF(300, 100);
document.ActiveLayer.AddChild(shape2);
NLineShape line1 = new NLineShape();
line1.StyleSheetName = "Connectors";
line1.StartPlug.Offset = new NSizeF(0, -10);
line1.EndPlug.Offset = new NSizeF(0, -10);
document.ActiveLayer.AddChild(line1);
line1.FromShape = shape1;
line1.ToShape = shape2;
NLineShape line2 = new NLineShape();
line2.StyleSheetName = "Connectors";
line2.StartPlug.Offset = new NSizeF(0, 10);
line2.EndPlug.Offset = new NSizeF(0, 10);
document.ActiveLayer.AddChild(line2);
line2.FromShape = shape2;
line2.ToShape = shape1;
This piece of code will result in the following diagram (which exactly fulfils your requirements):
Best Regards,
Nevron Support Team