Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

diagramm version info

0 votes
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).
asked Apr 20 by sheriff (120 points)

1 Answer

0 votes

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 ?

answered Apr 20 by plantuml (118,230 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!
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?
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
I don´t use the Word Plugin.
a %filedate% variable would be perfect.
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!
How can I integrate / use it with the Eclipse Plugin?
PlantUML Feature    net.sourceforge.plantuml.feature.feature.group    / PlantUML Team
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.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter