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.

Expand environnement variable in constants

0 votes
Hello,
To automatically set some text (Title, caption, ...), it would be nice to have environnement variable in "constant" like with "include"
 
For example (under Windows)
@startuml
!define THE_DATE %date%
Title Generated THE_DATE
@enduml
 
Best Regards
asked Oct 24, 2016 in Wanted features by Serge Wenger Work (1,860 points)

1 Answer

+1 vote
 
Best answer

Good idea!

With last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

@startuml
!define THE_DATE %date%
!define ANOTHER_DATE %date[yyyy.MM.dd G 'at' HH:mm:ss z]%
Title Generated THE_DATE or ANOTHER_DATE
alice -> bob
@enduml

The format for date is defined here:

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Thanks for the suggestion,

answered Oct 25, 2016 by plantuml (113,980 points)
selected Oct 26, 2016 by Serge Wenger Work
Thanks, it is working well
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...