Unable to reset the graph.

Jan 9, 2014 at 11:50 AM
Hi,

Is it possible to reinitialize the graph with new data? Until now I have already tried:
  1. Removing vertices using RemoveVertexWithEdges() method and adding new vertices using AddVertex() - this makes the app hang in unknown thread (unable to debug).
  2. Creating new Graph object but that didn't have any impact on rendered graph.
I have also noticed that vertices have to be added in MainWindw's constructor to work properly. If I try to delay adding vertices then only arrows of the diagram are displayed and a exception text is printed in to the graph:

"Graphviz4Net: an exception was thrown during layouting.Exception message: LayoutDirector: the RunDot method must be invoked before call to BuildGraph."
Coordinator
Jan 9, 2014 at 4:37 PM
Hi there,

the demo which is included in the distribution (and you can see its screenshot on the bottom of the codeplex front page) supports adding and removing of vertices and adding of vertices. Have you checked it?
Jan 14, 2014 at 2:45 PM
Yes I did. Unfortunately demo doesn't work as well. I've noticed a few issues:
  • removing last vertex from a subgraph produces exception.
  • I modified the demo code so that it's not using subgraphs. After removing all vertices and then adding - an attempt to add new edge results in exception thrown (vertices name have to be multi word ie: "new vertex name").
  • if I rearrange the code so it doesn't create the graph at constructor time but rather on demand (ie. when Update Person button is clicked and combo box is blank) it also throws an exception ("Graphviz4Net: an exception was thrown during layouting.Exception message: LayoutDirector: the RunDot method must be invoked before call to BuildGraph.")
Nov 27, 2016 at 12:20 PM
I'm having the same issue: removing the last Person from the Work subgraph or the School subgraph throws an exception.

Any thoughts on how best to fix this? I suspect somewhere the sample app needs to check if a subgraph becomes empty, it needs to be removed as well.

Should this be the responsibility of the demo app code? ...or somewhere in the Core project?

Best regards,
Michael Herman (Toronto)

p.s. This is a great design and it produces very high quality renderings at every scale. Thank you