Plantuml & vscode : Cannot include files with environment variables

0 votes
asked Jun 11 in Question / help by anonymous

Hi

The latest PlantUML extension 2.11.1,when used with vscode, breaks the generation of diagrams specifically when including files with environment variables

@startuml
include %MACRO_FILE%

!include %HOME%/plantuml/macros.txt

The following error is seen

cannot include %MACRO_FILE%
Some diagram description contains errors

1 Answer

0 votes
answered Jun 11 by plantuml (200,240 points)

The preprocessor has been changed with last version (see http://plantuml.com/preprocessing )

Could you try this way :

!include %getenv("MACRO_FILE")
!include %getenv("HOME")/plantuml/macros.txt

And tell us if it's working this way. Thanks

commented Jun 14 by anonymous
The suggested way works.

Thank you.
...