command line or in-program use

Hi. I have made a small application that generates dot language graphs. These are saved to text files, like so:

digraph chain{
1->3 [style=bold,label="1"]
2->3 [style=bold,label="1"]
3->3 [style=bold,label="1"]
3->1 [style=bold,label="1"]
3->2 [style=bold,label="2"]
}

I have been opening these in Graphviz on Windows 7 and I am very happy with the result. Thanks to everyone who contributed to this excellent piece of software. It would be nicer if I could generate a graphics file by calling an exe or dll from within my application. I tried calling dot.exe at the command prompt with "dot filename", but this resulted in a message saying that there was a syntax error near ' *digraph'. Actually there was a strange character where I have written *, but I don't know how to type that. I have also looked at some brief instructions for using calling cgraph.dll from within my application, but this was a bit baffling. Are there some tutorial-type instructions for how to do these things?

Thanks, Dave.

You should certainly be able

You should certainly be able to run "dot filename" from a command shell (and hoping that you are using the -o option or redirecting the output to a file). My guess is that your file may contain a non-printing spurious character at the beginning? You might want to post the file so someone can check.

The library manual can be a bit daunting. As usual, the best trick is to find and example to get you going and extend that. I realize now that the Windows package does not come with the sample programs from the source package. Go to the documentation page http://www.graphviz.org/Documentation.php and look for the Sample Program using Graphviz. These should get you started.

Recent comments