Posted By

jimfred on 03/14/09


Tagged

dot graphiz


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Graph Visualization and Layout in C# using AT&T's Graphiz and an SVG viewer


 / Published in: C#
 

URL: http://vv.cs.byu.edu/cs312-003/archives/2005/01/graph_visualiza.html

  1. private void button2_Click(object sender, System.EventArgs e) {
  2.  
  3. string strCmdLine1 = "-Tsvg -o c:\\tmp\\foo.xml c:\\tmp\\ER.dot";
  4. string strCmdLine2 = "-Tsvg -o c:\\tmp\\foo.xml c:\\tmp\\Heawood.dot";
  5. System.Diagnostics.Process p = new System.Diagnostics.Process();
  6.  
  7. p.StartInfo.FileName = "\"C:\\Program Files\\ATT\\Graphviz\\bin\\dot.exe\"";
  8. p.StartInfo.CreateNoWindow = true;
  9. p.StartInfo.UseShellExecute = false;
  10. if (graphIndex == 0)
  11. p.StartInfo.Arguments = strCmdLine2;
  12. else
  13. p.StartInfo.Arguments = strCmdLine1;
  14.  
  15. p.Start();
  16. p.WaitForExit();
  17.  
  18. axSVGCtl1.reload();
  19. graphIndex = (graphIndex + 1) % 2;
  20. }

Report this snippet  

You need to login to post a comment.