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.

A preprocessor condition, based on the current plantuml.jar version?

0 votes
i'd like to differenciate iuml code based on the PlantUml version used. Is it possible?

such as:

!if %PLANTUML_VERSION% >= 1.2017.12
    <new code>
!else
   <legacy code>
!end
asked May 24 in Wanted features by boshka (1,150 points)
edited May 24 by boshka

1 Answer

0 votes

It's not possible in official release, but in last beta:

https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

You can have:

@startuml
title this is %PLANTUML_VERSION%
alice -> bob : hello
!if %PLANTUML_VERSION% > 1201713
alice -> bob : A
!else
alice -> bob : B
!endif
@enduml

Unfortunately, this is not working with "old" release.

Thanks for the suggestion!

answered May 29 by plantuml (126,850 points)
Hello,

Could you add !if in the PlantUML keyword file generated with -language?

Thanks
Sure, thanks for the remind ! :-)
https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0
Regards,
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...