Plantuml & vscode : Cannot include files with environment variables

0 votes
asked Jun 11, 2019 in Question / help by anonymous


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

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, 2019 by plantuml (226,400 points)

The preprocessor has been changed with last version (see )

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, 2019 by anonymous
The suggested way works.

Thank you.
commented Apr 24 by Hoggamania
Using getenv doesn't return anything with VSCode plugin....