Hello! Please, tell me how to create and add new Egde to GViewer programmatically?
I can't get this working without some hacks at the moment(
new_edge = gcnew Edge(ivn1->Node, ivn2->Node, ConnectionToGraph::Connected, gv->LayoutEditor->EdgeAttr->Clone());
new_edge->SourcePort = gcnew FloatingPort(new_edge->SourceNode->GeometryNode->BoundaryCurve, new_edge->SourceNode->GeometryNode->Center); // exception SourcePort is null in RouteEdge() without this
new_edge->TargetPort = gcnew FloatingPort(new_edge->TargetNode->GeometryNode->BoundaryCurve, new_edge->TargetNode->GeometryNode->Center); // exception TargetPort is null in RouteEdge() without this
IViewerEdge^ ive = gv->RouteEdge(new_edge);
gv->AddEdge(ive, false); // fails without RouteEdge()
gv->LayoutEditor->AttachLayoutChangeEvent(ive); // edge line is not moved together with nodes without this (why?)
setLabelForEdge(ive, weight);
Hello! Please, tell me how to create and add new Egde to GViewer programmatically? I can't get this working without some hacks at the moment(