diagramm version info

0 votes
asked Apr 20 by sheriff (120 points)
Is there a way to automatically display/ print out a version information of the diagram in a PlantUML chart (e.g. a Timestamp or SVN  revision number or somthing like that)?
This is necessary to compare or for reviews after regular updating (export of the charts as PNG into a Word document).

1 Answer

0 votes
answered Apr 20 by plantuml (131,770 points)

Sorry, you have to be more specific in your request: I am not sure to understand it fully.

Today, you can print the current version of PlantUML:

Or using the preprocessor ( http://plantuml.com/preprocessing ), you can also have:

header generated at %DATE%
Bob -> Alice : hello

Is this what you are expecting ?

commented Apr 20 by sheriff (120 points)
thanks for the quick answer:

"version" dosn´t work for me => the response is "Forbidden line version"
but "header generated at %DATE%" works very well.
Thanks for the hint!
commented Apr 21 by sheriff (120 points)
The solution is good, unfortunately, updates the variable %date% every  time if I open a diagram. I need the last modification date. Is there another variable or possibility here? Where can I view a list of variables?
commented Apr 21 by plantuml (131,770 points)
By default, there is also %filename% and %dirpath% but those variables won't help you for version control.

We could add some %filedate% variable. Note that this won't help you neither if you are using the Word Plugin (is this what you are using ?) because this will be the date of the temporary file generated by Word, that changes at each run.

Another option is to set some variable from the command line http://plantuml.com/command-line
For example:
java -jar plantuml.jar -DVERSION=1.4 ...

header generated by version VERSION
Bob -> Alice : hello
commented Apr 21 by sheriff (120 points)
I don´t use the Word Plugin.
a %filedate% variable would be perfect.
commented Apr 21 by plantuml (131,770 points)
Ok, with last beta:
You can use %filedate%

There is no way to format the date right now (as for %date%) but we will add this in the future if needed.

Tell us if it helps!
commented Apr 21 by sheriff (120 points)
How can I integrate / use it with the Eclipse Plugin?
PlantUML Feature    net.sourceforge.plantuml.feature.feature.group    / PlantUML Team
commented Apr 21 by plantuml (131,770 points)
Sorry, our correction will not work with Eclipse Plugin, because the integration between PlantUML and Eclipse is not based on command line interface.

However, you should open a request on https://github.com/hallvard/plantuml/issues so that we could work together with the Eclipse Team to provide such %filedate% option from Eclipse.