Closed stefjoosten closed 2 years ago
@hanjoosten , I ran your attempt using:
I used the same large input files as you did. The result is the same as yours with Graphviz version2.43 on Windows: It runs into an error when generating LogicalDataModel_Grouped_By_Pattern.png. With one difference, however. LogicalDataModel_Grouped_By_Pattern.png has not been written.
sjo00577@BA92-C02T81JCGTDY GrotePlaatMateriaal % ampersand documentation --format docx ConceptueleAnalyse.adl --graphics
Generating functional design document for Veligheidsregios...
/Users/sjo00577/surfdrive/LMS/Ampersand/GrotePlaatMateriaal/images/TechnicalDataModel.png written.
/Users/sjo00577/surfdrive/LMS/Ampersand/GrotePlaatMateriaal/images/LogicalDataModel.png written.
Error running utility program: Unable to create ./images/LogicalDataModel_Grouped_By_Pattern.png
I also did it on a slightly smaller subset of the same input. With success: There were no Graphviz errors and the file LogicalDataModel_Grouped_By_Pattern.png was generated.
I did some tests myself too: I isolated the original .gv file, that was created from your original mail. I observed that creating it causes no problem. Also rendering it in the vscode extention causes no problem.
So I tried to render it using my version of dot, which is on ubuntu. The latest version on ubuntu currently is dot - graphviz version 2.43.0 (0)
. The command I run is
dot -Tpng LogicalDataModel_Grouped_By_Pattern.gv -o test.png
This gives a nice result. However, there are some warnings about ports not being found. I have to dive into that, but that has to do with the drawing itself.
I also did a code inspection on the Graphviz package that we use. There is no reason to believe that it is broken.
@stefjoosten created a somewhat smaller testcase. That one works fine. The problem occurs in a large model, and is likely caused by graphviz itself. I Also looked at the aforementioned warnings. That is because of some wierd combination of the use of ports and subgraphs. I consider this something we have to live with for now.
Problem
The
ampersand documentation
command generates a file called LogicalDataModel.png. This picture is usually too large to print on an A4, but this feature request will make it even larger. The problem is that Graphviz places the entities in the global context and entities that are defined inside a pattern are sometimes taken apart. I wish entities that are defined inside the same pattern are drawn in the same contour and that contour is labeled with the name of the pattern. I would hope that large diagrams become more readable if entities from the same pattern are kept together.Complications
@hanjoosten, I have sent you some test input.