1

I am trying to draw an interaction diagram with Doxygen, using the external Mscgen utility.

This is the source file:

/// test.h

/** Interaction diagram.
 * Test.
 *  \msc "Test interaction diagram"
 *      A,B,C;
 *      B->C;
 *      A<-B;
 *  \endmsc
*/

class A {};

class B {};

class C {};

I installed the mscgen.exe executable, and I set its path in the environment variable.

When running Doxygen, from its log this is all I get in relation to interaction diagrams: "Searching for msc files...".

The final Doxygen output contains a place holder for a missing interaction diagram, and the "Test interaction diagram" label.

I must be missing something in the Doxyfile file. How can I make Doxygen call the mscgen.exe executable?

Looking at the PNG files generated, the one Doxygen is looking for is missing, so I suppose mscgen.exe has not run at all.

This is the Doxygen generated HTML code block:

<div align="center">
<img src="../../msc_inline_mscgraph_1.png" alt="msc_inline_mscgraph_1" border="0" usemap="#msc_inline_mscgraph_1.map">
<map name="msc_inline_mscgraph_1.map" id="msc_inline_mscgraph_1.map"></map>
<div class="caption">
Test interaction diagram</div>
</div>
albert
  • 8,285
  • 3
  • 19
  • 32
Pietro
  • 12,086
  • 26
  • 100
  • 193
  • My mscgen on Windows is in my path and when running the example with a default Doxyfile (i.e. generated with doxygen -g) I see a correct diagram. An alternative would be to set the path of the mscgen executable in the variable MSCGEN_PATH in the Doxyfile. – albert Feb 25 '15 at 11:47
  • @albert - I set mscgen's path in the PATH system variable. It is visible, e.g., from the command line. This should imply every application should see it, right? – Pietro Feb 25 '15 at 14:57
  • I think indeed that every application should see it. You can test it by giving mscgen -v in a DOS-box. Did you try the example you gave here with a default Doxyfile? If so what were the results? – albert Feb 25 '15 at 16:47

2 Answers2

1

Try removing the caption. I have the same problem on Windows. I do not have other platforms handy to compare results and see if it is a Windows-only problem. When I do:

@msc "hello, world"
   a, b;
   a => b;
@endmsc

The figure does not generate. If I remove the caption, like this:

@msc
   a, b;
   a => b;
@endmsc

The figure generates, but there is no caption. When the caption is present, I see the error:

error: failed to open map file path-on-my-local-computer-redacted/docs/html/inline_mscgraph_2.msc.map for inclusion in the docs!

The interesting part is that the file is not generated when there is no caption either -- the difference is that Doxygen does not seem to care that the map file does not exist. I do not seen an obvious option that controls map file generation.

Sorry, for just a partial answer several months after the original question. I got here Google searching for an answer the same question and hope this will at least let others get sequence charts without captions.

wrdieter
  • 2,836
  • 1
  • 21
  • 19
1

I had the exact same problem and found that a syntax error in the msc-part was the reason. Once I got it error-free, it all build well.

It take me a while to identify the problem. A search took me to a guy's thread "Problem with msc graph" who had the same problem and the solution:

[...] If there is a syntax error in an msc tag then At the end of the generation run I get the following error message:

error: failed to open map file [...]

Claudius
  • 31
  • 1
  • 4